You can do some event processing by either calling QApplication::processEvents() or by using a local QEventLoop.
But delay something until the event loop runs, you can also call a slot via single shot timer or QMetaObject::invokeMethod().
Another technique is to do something the first time the main window's showEvent() is being called.
Cheers,
_
Bookmarks