[Interest] Prevent QGroupWidget from shrinking children below mimimum size

Etienne Sandré-Chardonnal etienne.sandre at m4x.org
Wed Apr 10 12:05:10 CEST 2013


Dear interest users,

I am designing a dock widget with some tools inside, mainly QLabels and
Tool buttons. At first, I organised it with horizontal and vertical lines
and nested layouts, with minimum sizes on my QLabels. This worked well.
When I organize it with QGroupWidgets, they do not respect minimum sizes of
the widgets nested in layouts anymore, and the user can reduce the dock
widget size with no lower size limit, everything getting shrunk. With only
nested layouts and lines, it worked well.

I have tried to set the layoutSizeConstraint to "SetMinimumSize" without
success (by the way, I have never fully understood that feature)

How can I have the same behavior with QGroupWidget? I could set a minimum
size to the QGroupBox, but that's very inelegant and not robust to design
and themes change.

Cheers,

Etienne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130410/2674a12a/attachment.html>


More information about the Interest mailing list