[Interest] Qt5: Obtain current layout size

Bill Crocker william.crocker at analog.com
Mon Jul 23 01:25:05 CEST 2012

On 07/21/2012 12:27 PM, Stephen Chu wrote:
> I am working on a dynamically generated form. One thing I'd like to do
> is to reflow the layout into multi-column when the widgets fill the
> preset window height.

Hack alert...

Some Window Managers will let you bring a window up
off screen where it will exhibit the final size, but
not appear to the user.  In the past I have used this trick
to find the final size of a window before I move it into


> I need to find out what the current layout height is before I add the
> new widget. The problem is, layout geometry is always 0x0 before the
> window is shown. And if I show the window before adding the widgets, not
> only does the window flickers badly, it also doesn't auto-position
> correctly. What's worse, the geometry reported is still 0x0.
> So how do I get the correct layout or parent widget size before showing
> the widget/window? Thanks.
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

More information about the Interest mailing list