引用第3楼rashka于2009-07-10 18:43发表的 :
wait函数是用来等待其他线程结束的,无法让当前线程阻塞
建议你仔细看一下文档吧
bool QThread::wait ( unsigned long time = ULONG_MAX )
Blocks the thread until either of these conditions is met:
-The thread associated with this QThread object has finished execution (i.e. when it returns from run()). This function will return true if the thread has finished. It also returns true if the thread has not been started yet.
- time milliseconds has elapsed. If time is ULONG_MAX (the default), then the wait will never timeout (the thread must return from run()). This function will return false if the wait timed out.
This provides similar functionality to the POSIX pthread_join() function.
See also sleep() and terminate().