I am running 5 threads as below
void dialog::myfunction()
{
for(int i=0; i< 5 ; i++
{
QtConcurrent::run()
}
i_event.exec()
qDebu() <<"All threads finished";
}
void dialog::myfunction()
{
for(int i=0; i< 5 ; i++
{
QtConcurrent::run()
}
QEventLoop l_event;
i_event.exec()
qDebu() <<"All threads finished";
}
To copy to clipboard, switch view to plain text mode
I want to wait here till all the threads get finished.
void QFutureSynchronizer::waitForFinished () //is hanging my main GUI.
void QFutureSynchronizer::waitForFinished () //is hanging my main GUI.
To copy to clipboard, switch view to plain text mode
So I want to use some thing like this QEventLoop::exec(); But qDebug() is not getting called at all, Is there a way to reach qDebug() once all the threads finished.
For some other reason I can not use QFutureWatcher().
Any suggestions ?
Bookmarks