Results 1 to 2 of 2

Thread: How to quit my application from any point of any class

  1. #1
    Join Date
    Sep 2010
    Posts
    654
    Thanks
    56
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default How to quit my application from any point of any class

    I can't get to terminate my application from a class that is at a deep level.
    (In example class A, creates B, this creates D, and this last has a for loop in which class E is used ).
    qApp.quit(); does nothing. (neither other options)
    Any help ?

  2. #2
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: How to quit my application from any point of any class

    By connecting one quit_signal to the qApp's quit slot.

    LE: You need: #include <QApplication> into the .cpp where you want to use the qApp macro.
    Last edited by Zlatomir; 28th July 2011 at 10:16.

  3. The following user says thank you to Zlatomir for this useful post:

    tonnot (28th July 2011)

Similar Threads

  1. Replies: 3
    Last Post: 21st June 2011, 20:37
  2. Application won't quit until event loop quits
    By caelestis in forum Qt Programming
    Replies: 6
    Last Post: 11th February 2010, 08:21
  3. Why my application quit?
    By yxtx1984 in forum Newbie
    Replies: 1
    Last Post: 7th February 2010, 06:46
  4. Replies: 1
    Last Post: 3rd December 2009, 15:23
  5. how to paint scene point by point
    By elessaar in forum Qt Programming
    Replies: 8
    Last Post: 4th September 2008, 21:00

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.