Results 1 to 7 of 7

Thread: QT video tutorials on YouTube

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2010
    Posts
    55
    Thanks
    1
    Thanked 11 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    9

    Default Re: QT video tutorials on YouTube

    Thanks for posting the videos, here is some constructive criticism:

    1. First of all; the way you are using the mutex in your code is wrong. You are creating the QMutex with a local scope. The idea is to guarantee exclusive access between threads -- in your example each thread would just lock its own mutex, it's not mutual at all. What you should do is to declare the mutex as a class member. Besides, defining 'Stop' as a public member is probably not a good idea either.

    2. In your explanation, you seem to confuse deadlocks with race conditions. A race condition can happen when multiple threads access and manipulate some sort of shared resource concurrently. If an operation is not atomic, it can be interrupted in mid-operation; this can lead to undefined behaviour or even the program to crash. Mutual exclusion is therefore necessary to enforce atomicity for a specific code segment.

    A deadlock typically happens when two threads find themselves waiting for each other to release a lock.

    3. Most of the time, it is not necessary to subclass QThread, this article has some interesting points: http://labs.qt.nokia.com/2010/06/17/...oing-it-wrong/

    The only valid reasons I can think of for subclassing QThread is to add functionality that QThread doesn’t have, e.g. perhaps providing a pointer to memory to use as the thread’s stack, or possibly adding real-time interfaces/support. Code to download a file, or to query a database, or to do any other kind of processing should not be added to a subclass of QThread; it should be encapsulated in an object of it’s own.
    There are also many ways to avoid dealing directly with locking primitives altogether in Qt thanks to the QtConcurrent API and by using signals and slots.

  2. #2
    Join Date
    Aug 2010
    Location
    Chennai
    Posts
    21
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QT video tutorials on YouTube

    Thanx . I've subscribed to your channel .

    Also if you know somebody who uploads PyQt Tutorials , then specify here . It'll help a lot.

  3. #3
    Join Date
    Oct 2010
    Location
    Porto Alegre
    Posts
    19
    Thanks
    3
    Thanked 2 Times in 1 Post
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default Re: QT video tutorials on YouTube

    Nice videos.

  4. #4
    Join Date
    Jan 2011
    Posts
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QT video tutorials on YouTube

    wow thank you for the feedback!!!

    I learned more about threading from those links then from 3 Qt books.

  5. #5
    Join Date
    Mar 2013
    Posts
    2

    Default Re: QT video tutorials on YouTube

    thanx for the video

Similar Threads

  1. youtube upload
    By ernie in forum Qt Programming
    Replies: 15
    Last Post: 2nd September 2015, 14:29
  2. play a video from youtube
    By graciano in forum Qt Programming
    Replies: 2
    Last Post: 13th July 2011, 07:17
  3. need help youtube APIs with qt
    By doforumda in forum Newbie
    Replies: 5
    Last Post: 18th November 2010, 20:09
  4. Downloading a video from youtube
    By Faster in forum Qt Programming
    Replies: 21
    Last Post: 28th November 2009, 12:46
  5. Video Tutorials or step by step guides?
    By Dumbledore in forum Newbie
    Replies: 2
    Last Post: 10th October 2007, 08:33

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.