[Interest] Update widget geometry BEFORE window shown

David M. Cotter dave at kjams.com
Fri May 24 00:52:44 CEST 2024


I need to do something like this:

windowP->layout()->updateGeometry(); // causes all widget geometry to update
DoSomethingImportant(windowP->GetWidget(“someWidget”).geometry()); // do something with the geometry of a widget (which must be up to date)
windowP->setGeometry(windowP->GetInitialGeometry()); // pos/size now based on the fact that we KNOW the geometry of one of the widgets BEFORE the window is shown
windowP->show(); // only NOW show the window, NOT before now

How do I do something like the first line? Cause all widget geometry (Recursively), to know / figure out its size AND position? And this BEFORE the window or any widget is “shown”  via the windowP->show() command?

Please don’t try to tell me to do it differently. If you don’ know how to answer it, please don’t chime in, thanks.

-Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20240523/afc6954e/attachment.htm>


More information about the Interest mailing list