[Qt-interest] Layouts and Resizing

Willy P willy.lists at gmail.com
Fri Apr 10 21:23:59 CEST 2009


Hey,
I'm creating a standalone widget and I'm having some funny behavior w/
resizing.

I have a parent widget which contains a groupbox which contains a
QGraphicsView.  All are embedded in layouts.

At the end of the widget's constructor these are the sizes of everything:

Widget: QSize(824, 697)
GroupBox: QSize(100, 30)
QGraphicsView: QSize(100, 30)

The GroupBox and GraphicsView should be just a little bit smaller than
their parent widget.  Once I resize the window just a little bit they
snap into their correct sizes.  Why is the widget's layout not telling
the GroupBox and the GraphicsView to be the correct size on
construction?

Thanks for your help...

(Qt 4.5 on linux)

-Willy



More information about the Qt-interest-old mailing list