C++ Qt 31 - QThread part 4 threads with a GUI
Loading...
5,982
Loading...
Uploader Comments (VoidRealms)
see all
All Comments (14)
-
Using QT4, I keep running into "undefined reference to 'vtable for MyThread' warnings. Subsequently, I can't get the program to run. I have confirmed that the code matches the tutorial verbatim, with no spelling errors. Ideas?
-
Thanks !!! great tutorial. XD PURA VIDA (I am Tico)
-
Great ! Thanks for this tutorial.
However, I have to add thread->usleep(100) (smaller than msleep()) or the worker thread will block my main GUI.
-
simply great!! you are now my first source regarding qt
-
Great video. Helped me resolve threading issue. Thank you.
Loading...
Your mutex doesn't make sense, you seem to be protecting your stop boolean, but only the thread itself uses the lock, the main thread which is changing the value of the boolean isn't using the lock (really, you should have a member function to call to set the boolean, which itself can use the mutex). Furthermore, for such a simple operation of checking a boolean, is a mutex really required? I would of thought not.
googletitsfost 1 year ago
@googletitsfost - good catch I really struggled to come up with a good example, seems a better one is needed.
VoidRealms 1 year ago