how to immediately show / update a window without returning to event loop?
-
on windows, the moment i call this:
i_qWindP->show();
the window shows. on mac it doesn't show. is there some "idle" call i can make to allow the OS some CPU time to get the window on screen?
then, say i update a control in that window (like, a progress bar), how do i get that to flush immediately? this is during startup so we're not at the event loop just yet...
-
Okay it seems the secret was calling QApplication::processEvents();
-
okay i'm calling repaint() on the QWindow widget but it doesn't actually draw when i step over that call, do i need to somehow yield some time to the event handler for that to actually be serviced?
-
also, on the mac, the window isn't even being shown. i call show and i get nothing.
-
This post is deleted!
-
Hi,
What do you do in that QWindow ?
Since it's a QWindow, you are likely doing OpenGL therefore, did you initialise everything properly ?
-
Okay it seems the secret was calling QApplication::processEvents();
-
@davecotter said in how to immediately show / update a window without returning to event loop?:
okay i'm calling repaint() on the QWindow widget but it doesn't actually draw when i step over that call, do i need to somehow yield some time to the event handler for that to actually be serviced?
That QWindow was then misleading ;-)
As for your solution, you are in fact forcing a round of the event loop.