[Qt-interest] More struggles with layouts and resizing -- QGroupBox gets squashed
K. Frank
kfrank29.c at gmail.com
Mon Mar 29 00:35:12 CEST 2010
Andreas -
Thank you.
On Sun, Mar 28, 2010 at 3:57 PM, Andreas Pakulat <apaku at gmx.de> wrote:
> On 28.03.10 11:48:13, K. Frank wrote:
>> I'm still trying to figure out how to use resizing most effectively.
>> I will give a
>> concrete example and ask a general question.
>> ...
>> In case b (the QRadioButton's are in a QGroupBox), the QTableView expands
>> (as expected), but the QGroupBox shrinks down to the point that only its title
>> is visible, and its contents (the QRadioButton's) are hidden.
>
> Check again where you got "QGroupBox" from on the left "widgets" list.
> Its in the "Container" group, meaning that it itself can contain
> widgets. As a widget-container it also can have a layout and thats what
> you apparently didn't set. If a QGroupBox has no layout it behaves much
> the same as a top-level widget without layout when you resize it to a
> minimal size.
Yes, that is exactly what I was looking for. I wasn't aware that a container
widget can (and, I guess, should) have a layout applied to it. I've applied
a vertical layout to the QGroupBox in my example b, and things are working
nicely now.
> Andreas
Best regards.
K. Frank
More information about the Qt-interest-old
mailing list