C++ Qt 31 - QThread part 4 threads with a GUI

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
5,982
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jan 29, 2011

part 4 of our threading tutorial bring together everything you have learned into a simple GUI application.

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (VoidRealms)

  • 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 - good catch I really struggled to come up with a good example, seems a better one is needed.

see all

All Comments (14)

Sign In or Sign Up now to post a comment!
  • 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...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more