PDA

View Full Version : QLayout and the size of the widget



jimfan
20th December 2007, 08:01
I have a widget that uses a grid layout, after adding the child widgets into the layout, it seems that I have to manually calculate the size of the main widget for the minimum size, otherwise the main widget won't be displayed. This doesn't make too much sense and I must be missing something here. Can anyone help me with this problem?

Thanks...

jpn
20th December 2007, 08:19
Perhaps you forgot to actually set the layout on the "main widget"?

jimfan
20th December 2007, 17:04
No I did set the widget layout to this layout.

Right now I am using QLayout::minimumSize to get the layout minimum size and set it as the minimum size of the widget, that works. But I guess it's not supposed to be like this right?