PDA

View Full Version : No instant response in while(1) loop?



casual0402
20th March 2010, 14:44
Hi, everybody!
I write a piece of code like this:
1. press hotkey F10 or start button to start while(1) running.
2. in while(1), there is a flag-checking function, if flag == false, break.
3. hotkey F11 or stop button pressed could emit a signal to the slot setting the flag to false, so it could jump out of the while(1) loop.

I start the while(1) loop, but when I press F11 or stop button, it could not respond instantly. That is, it could not stop...:(

squidge
20th March 2010, 15:41
That is correct. Please read this: http://doc.trolltech.com/qq/qq27-responsive-guis.html

casual0402
20th March 2010, 16:09
Thanks a lot