I know, there are some similar questions to the following out there, but I couldn\'t find a concrete answer that helps me. So here\'s my problem:
I work on an applic
The way to do this is to use nested event loops. You simply create your own QEventLoop, connect whatever signal you want to wait for to the loop's quit() slot, then exec() the loop. This way, once the signal is called, it will trigger the QEventLoop's quit() slot, therefore exiting the loop's exec().
MyApp::MyApp(QWidget *parent) : ....
{
doSomeInits();
{
QEventLoop loop;
loop.connect(configManager, SIGNAL(updateCompleted()), SLOT(quit()));
configManager->updateConfigurations();
loop.exec();
}
doReaminingInitsThatHadToWaitForConfigMgr();
}