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...:(
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...:(