Results 1 to 4 of 4

Thread: Qt signal handling question

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanked 370 Times in 336 Posts

    Default Re: Qt signal handling question

    if you carefully read documentation about QApplication you will see that there is qApp macro which performs access to an application instance.
    so, you can use this macro whenever you need.
    Qt Code:
    1. int main(int argc, char **argv)
    2. {
    3. QApplication app(argc, argv);
    4.  
    5. MyWidget mw;
    6. mw.show();
    7.  
    8. return app.exec();
    9. }
    10.  
    11. void MyWidget::loop()
    12. {
    13. while (m_flag) {
    14. ...
    15. qApp->processEvents();
    16. }
    17. }
    To copy to clipboard, switch view to plain text mode 
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

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

    gd (12th November 2009)

Similar Threads

  1. Signal Slot Question
    By graciano in forum Newbie
    Replies: 8
    Last Post: 19th August 2009, 10:35
  2. pthread instead QThread
    By brevleq in forum Qt Programming
    Replies: 8
    Last Post: 23rd December 2008, 07:16
  3. Connection of custon signals/slots
    By brevleq in forum Qt Programming
    Replies: 2
    Last Post: 23rd December 2008, 07:04
  4. QLabel text change signal question
    By MarkoSan in forum Newbie
    Replies: 10
    Last Post: 5th April 2008, 10:19
  5. Another signal and slot question
    By fnmblot in forum Newbie
    Replies: 5
    Last Post: 4th March 2008, 19:50

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.