PDA

View Full Version : Can not interrupt a process when set var=interrupt=true + process 'allevents'



tonnot
7th June 2011, 00:51
I have a button with the text 'start', when a 'my_process' starts I change its text to 'stop' if I click on the button when its text is 'stop' I call my_process.interrupt, which sets interrupt =true, but even if I execute :
QApplication::processEvents(QEventLoop::AllEvents) ;
I can not detect my_var interrupt== true.
Any idea ? Thanks.

wysota
7th June 2011, 00:52
My idea is you should express your thoughts a bit more clearly for people to understand you. I have no idea what setting a variable has anything to do with Qt's event loop.

tonnot
7th June 2011, 08:24
Solved I 'm calling a interrupt function on a new class instance.
Sorry .....