Added: 1 year ago
From: VoidRealms
Views: 5,893
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (12)

Sign In or Sign Up now to post a comment!
  • 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.

  • Small Note:

    It's better to set the "Stop" boolean to "false" in the MyThread constructor,

    Just to guarantee that the loop will work on the program kick-off.

    Thanks for the tutorial :)

  • I don't usually comment on youtube videos, but I've got to thank you very much for this!

    GREAT tutorial, it's 1:12 am and my program is working now!

  • Great tutorial series, thank you!

    I have a question though : Is it just me or the GUI freezes if you don't use the sleep?

  • @yzaroui I'v encoutered GUI freezing when forgot to add on_NumberChanged SLOT to public section and program did nothing before i fixed it) But its very usefull video as 4 Beginner like me

  • great tutorial video

    thank you very much

  • great tutorial, but the placement of your mutex does not make sense there. your mutex is created on the stack, so each thread will have it's own mutex instance. Which is like no mutex at all.

  • thanksssss

  • 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.

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