Tried something like that: qWidgetP->setAttribute(Qt::WA_DontShowOnScreen, true); qWidgetP->show(); qWidgetP->hide(); qWidgetP->setAttribute(Qt::WA_DontShowOnScreen, false);
It doesn’t do as advertised (window does not show, but also doesn’t lay out the geometry of widgets) -dave > On May 29, 2024, at 11:29 AM, John Weeks <j...@wavemetrics.com> wrote: > > Well, I wasn't going to say anything ("If you don’ know how to answer it, > please don’t chime in, thanks.") > > In my experience, Qt doesn't maintain a good notion of a window's size until > it's shown. But you are guaranteed a Resize event as the window is being > shown, so if you can manage it, you need to handle the Resize event and do > your polishing and layouting there. > > In fact, I had for a while a function called ShowAndHideInvisibly(); the > important part of it was like this: >> getQWidget()->setAttribute(Qt::WA_DontShowOnScreen, true); >> WMshow(); >> WMhide(); >> getQWidget()->setAttribute(Qt::WA_DontShowOnScreen, false); > > Maybe that helps. Setting the attribute prevents the screen flash. > > -John Weeks > WaveMetrics, Inc.
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest