Results 1 to 4 of 4

Thread: QT3 -- How does a gui communicate with a worker thread?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT3 -- How does a gui communicate with a worker thread?

    Quote Originally Posted by Ronayn View Post
    Wysota, your first answer contradicts your third.
    No, it doesn't
    To be crystal on this point, a QThread can use events to communicate (one-way) to the gui, but the gui cannot post events to the QThread (because it doesn't have an event loop). That is correct, yes?
    Yes, only one-way communication is safe in Qt3.

    So, you are saying QT3 doesnt provide a safe way for the gui to communicate to a QThread? If so, that's a bummer
    Not anything built-in. You can only use a mutex, have a queue of messages and periodically check the queue from within the thread.

    Does QT4? (if you know)
    Yes, in Qt4 you can use signals and slots and events (both ways).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. The following user says thank you to wysota for this useful post:

    Ronayn (21st September 2011)

Similar Threads

  1. Worker thread
    By doggrant in forum Newbie
    Replies: 4
    Last Post: 3rd November 2009, 15:49
  2. Worker thread problem
    By hkvm in forum Qt Programming
    Replies: 4
    Last Post: 6th September 2009, 20:12
  3. Showing progress bar while worker thread works
    By olidem in forum Qt Programming
    Replies: 6
    Last Post: 27th April 2009, 20:43
  4. Accessing data from a worker thread
    By steg90 in forum Qt Programming
    Replies: 20
    Last Post: 25th May 2007, 10:20
  5. Main thread - worker thread communication.
    By kikapu in forum Newbie
    Replies: 25
    Last Post: 23rd May 2007, 22:09

Tags for this Thread

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.