wait() blocks the thread that called it, so if you want both threads to run simoultaneously, you have to call wait() only when you called start() on both threads:
Qt Code:
MyThread t1, t2; t1.start(); t2.start(); t1.wait(); t2.wait();To copy to clipboard, switch view to plain text mode
Bookmarks