Results 1 to 8 of 8

Thread: Calling functions from other classes from QThread object

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2010
    Posts
    7
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Calling functions from other classes from QThread object

    Thanks wysota, your explanations are useful.

    I must be missing something - because the one thing I still don't understand is how am I meant to check for messages OVER and OVER and OVER again?

    Whatever thought process I use it comes back to an infinite loop, i.e., if I wrote
    Qt Code:
    1. connect(this, SIGNAL(gotMsg()), dialogue, SLOT(displayMsg()));
    To copy to clipboard, switch view to plain text mode 
    then somewhere in my code I'm still going to need an infinite for loop constantly waiting for messages and sending the gotMsg() signal when one arrives (that's what I used the thread for..)

    I think I'm missing something big...

  2. #2
    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: Calling functions from other classes from QThread object

    With Qt it's almost always about signals and slots Take a look at QSocketNotifier::activated().
    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.


Similar Threads

  1. Calling COM object from QT
    By mrityunjay in forum Qt Programming
    Replies: 0
    Last Post: 27th October 2009, 05:25
  2. Calling XPCOM Object from QT
    By sujith in forum Qt Programming
    Replies: 0
    Last Post: 3rd July 2009, 10:10
  3. Question about functions in classes
    By cwnelatury in forum Newbie
    Replies: 1
    Last Post: 13th May 2009, 06:05
  4. [QThread] Function calling after thread.stop()
    By Macok in forum Qt Programming
    Replies: 4
    Last Post: 7th February 2009, 13:33
  5. Calling QThread::exec() repeatedly
    By hb in forum Qt Programming
    Replies: 2
    Last Post: 26th June 2007, 20:24

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.