[Qt-interest] Layouts and Resizing

Willy P willy.lists at gmail.com
Fri Apr 10 21:30:50 CEST 2009


Ok, that was pretty silly.  I just called resize on the widget after
widget->show().  Still odd that the widget doesn't propagate the size
down on construction.



On Fri, Apr 10, 2009 at 12:23 PM, Willy P <willy.lists at gmail.com> wrote:
> 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