Pause for loop until signal receieved
Solved
General and Desktop
-
Hello,
I have the following piece of code:
for(int i = 0; i < entries.size(); ++i) { addSource(QUrl(entries.at(i).second), entries.at(i).first); //WAIT UNTIL SIGNAL RECEIVED }
Basically, what I want to achieve is that the for loops "pauses" until it receives a specific signal. Is there a way to implement this?
-
QEventLoop pauseLoop; connect(/*sender*/,/*signal*/,&pauseLoop,&QEventLoop::quit); pauseLoop.exec();
@VRonin It works, thanks a lot!!