I have group of label and combo box which I need to group. By toggling group name i should able to see the widgets. I have found only checkable in group box widget which is disabling the widgets instead collapsible. How can we achieve this in QT designers.
I want to achive like below in QT designer. Please show some light on this
This can theoretically be done in Designer, but with the following limitations:
setRetainSizeWhenHidden()
on their size policy, which can only be done by code;The procedure is the following:
toggled(bool)
signal on the left;setVisible(bool)
slot on the right;Note about point 3: adding a layout to a container always requires to add a child widget (Designer doesn't allow to create layouts for empty widgets). In case the container becomes too small to add child widgets before the layout is set, you can temporarily set its minimum height (and/or width, depending on the orientation) in the property box, then remember to reset that property once the layout has been set.
Remember that, in general, aspects like these are normally implemented by code for better control over their behavior.