groupbox scale to contents height in qtdesigner
im just getting started with qt and ive got an application containing lots of groupboxes in a window, which need to be as large as posible, but only as tall as they need to be to fit their contents, which will vary in size. obviously i could do this in code quite easily but it would be far neater to put that behaviour in via the designer, i just cant seem to see an obvious way of doing it.
im using qt designer version 4.8.2
Re: groupbox scale to contents height in qtdesigner
You use the same properties on layouts/widgets in Designer as you would implement in code to achieve a size that is fixed by the size hint of the contained widgets. What have you tried?
Re: groupbox scale to contents height in qtdesigner
not much, all i saw was pixel based sizing options, and lay out vertically option in the container widget
Re: groupbox scale to contents height in qtdesigner
You are looking for size constraints on the layout applied to each group box content, and on the layout that contains the group boxes.
See the "Extension Example" in Assistant for a mechanism that has the content control the size of the container (rather than the more typical container controlling its content).