Pre-allocating a space to insert my specialized widget
-
Hello,
I’m designing a composite widget in Qt Designer (PyQt5) that contains several standard widgets and one custom widget implemented in a separate class. I need to reserve a position for the custom widget in the middle of a QVBoxLayout.
Currently, I place a plain QWidget as a placeholder in Designer, then place my custom widget in the placeholder through init method. This works, but I suspect there's a cleaner or more appropriate way to handle this. What is the recommended method for allocating space for a custom widget and assigning it at runtime?

Thank you -
Hello,
I’m designing a composite widget in Qt Designer (PyQt5) that contains several standard widgets and one custom widget implemented in a separate class. I need to reserve a position for the custom widget in the middle of a QVBoxLayout.
Currently, I place a plain QWidget as a placeholder in Designer, then place my custom widget in the placeholder through init method. This works, but I suspect there's a cleaner or more appropriate way to handle this. What is the recommended method for allocating space for a custom widget and assigning it at runtime?

Thank you