How to create customDesignerWidget with functional QBoxLayout
Hi,
I have a customDesignerWidget that inherits from QGroupBox. Inside the groupBox I have a QVBoxLayout.
By default when you do this, you can not interact with the QVBoxLayout, meaning that you can not drag any widgets to it in designer because the designer only sees the customDesignerWidget plugin.
Any ideas how I could give access to the QVBoxLayout so that when the user drags a widget over this custom designer widget, the widget would be added to the QVBoxLayout?
Thanks
Re: How to create customDesignerWidget with functional QBoxLayout
Found the answer and it was embarrissingly simple.
Just add this to the domXml function in the subclassed QDesignerCustomWidgetInterface.
<layout class='QVBoxLayout' name='verticalLayout_2'></layout>
Note:
If you add a layout as a private member and then set the layout to the widget, this method does not work if you want the layout to be functional in the designer.