Results 1 to 3 of 3

Thread: Regarding emit'ing signals from a thread (QT3)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Jan 2006
    Location
    Athens - Greece
    Posts
    219
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    3
    Thanked 1 Time in 1 Post

    Default Re: Regarding emit'ing signals from a thread (QT3)

    If you have the Gui Programming with Qt3 book take a look at chapter 17, especially "Communicating with the GUI Thread".
    In a few words you can create a custom event that will have as a public member the array you want to send to the gui thread. Then whenever you want the gui to accept data you send the new event to the gui's enent handler from the worker thread using
    Qt Code:
    1. QApplication::postEvent()
    To copy to clipboard, switch view to plain text mode 
    and the array can then be handled from your gui thread.

    EDIT: Funny... Check out what happens if I don't wrap in [C O D E] tags: QApplication:ostEvent()
    EDIT2: With all this previewing and editing my post became obsolete. Anyway since you got the same answer twice it means that this is the way to go
    Last edited by yop; 6th January 2006 at 21:20.

Similar Threads

  1. Problem using signals and thread
    By aarelovich in forum Qt Programming
    Replies: 2
    Last Post: 30th June 2008, 13:57
  2. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 06:13
  3. Replies: 10
    Last Post: 20th March 2007, 22:19
  4. Problem closing a QMainWindow in Qt4.2
    By ian in forum Qt Programming
    Replies: 11
    Last Post: 17th October 2006, 00:49
  5. emiting signals from const member functions !?
    By sunil.thaha in forum Qt Programming
    Replies: 2
    Last Post: 25th March 2006, 11:29

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.