PDA

View Full Version : What is the general mechanism behind QDialog->exec()



33333
19th October 2011, 14:05
The crux of my problem is this: I want to block on a call to some function, have the event loop work in the mean time and return from that function back into the calling function then execute the next statement in that function ... just like a normal blocking function call. I do *not* want to have to exit the function and re enter another function after some later callback (in an event driven style). I know QDialog->exec() lets you do this. For example, the caller of QDialog->exec() blocks on the call. Then inside the function QDialog->exec() you can do a bunch of stuff setup event driven signal and slots code and have the calling function return later by calling accept(), reject, or done() in some slot of the QDialog. I want this behavious of QDIalog without the QDialog but I cant find any description of it. Can some please point me in the right direction?

Thanks,

33333.

nish
19th October 2011, 14:07
QEventLoop

33333
19th October 2011, 14:44
Ahhh, precisely. Thanks nish.