Well in the docs it says:That is, does wait() wait for event loop to exit (in which case the above doesn't work) or does it wait for run() to exit?
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.
Bookmarks