I have a Qt application with this kind of main()...
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MainWindow mainWin;
... A sep
You can send a signal to your window before the exec()
call. This will place an entry in app
's signal queue.
When exec()
is running, the signal will be delivered and your window will know that the event loop is running.
A simple way would be to use QTimer::singleShot(0, &mainWin, SLOT(onEventLoopStarted()));
which connects to a custom slot of your window class.