Re: When does show a window?
You can cause processing to be done when the event loop is reached (which is where any pending window painting will happen) by using a single shot timer in your constructor. see How can i check if QMainWindow is fully loaded ?
At least I think that is what you were after.
Re: When does show a window?
If Chris is wrong and you want to do something after the widget is shown, you can override showEvent() for your widget, and post an event, start a singleshot 0 timeout timer or use QMetaObject::invokeMethod() with Qt::QueuedConnection to trigger code execution after the control returns to the event loop after the widget is shown. Just make sure you don't execute the code each time the widget is shown.