PDA

View Full Version : How to manipulate a thread



avis_phoenix
18th August 2008, 23:03
I need to create a thread such that it can be paused, stoped, and restarted. I already know how to make it restart, but the other cases I still dont know how to do it. I have used wait() for stopping it, and sleep(1) for pausing it; in both cases the GUI frezzes. I would thank if someone could put an example on this matter.

Thanks.

jacek
18th August 2008, 23:34
If you want to stop the thread, you just have to make it return from run(). For pausing, take a look at QWaitCondition.