Results 1 to 3 of 3

Thread: How to control the exiting process of my application ?

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

    Default How to control the exiting process of my application ?

    I have this line to control if the application is going to be finished,
    Qt Code:
    1. connect(QApplication::instance(), SIGNAL(aboutToQuit()),this,SLOT(control_quit()));
    To copy to clipboard, switch view to plain text mode 
    control_quit show a confirmation message.
    I have two problems :
    1.- The main window (where I have the connect...) dissapears during the proccess. How can avoid this ?
    2.-How can I cancel the exiting ?
    Thanks

  2. #2
    Join Date
    Mar 2011
    Posts
    63
    Thanks
    11
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to control the exiting process of my application ?

    The signal is particularly useful if your application has to do some last-second cleanup. Note that no user interaction is possible in this state.
    Dont think you can abort the exiting after it is emited. Why not use QWidget::closeEvent?

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

    Default Re: How to control the exiting process of my application ?

    Of course. Thanks!

Similar Threads

  1. ActiveQt out of process control sends no events
    By UweS in forum Qt Programming
    Replies: 0
    Last Post: 16th May 2011, 14:08
  2. Replies: 3
    Last Post: 6th January 2010, 16:55
  3. Exiting a Qt Console Application
    By nbetcher in forum Qt Programming
    Replies: 4
    Last Post: 23rd March 2009, 21:03
  4. Replies: 3
    Last Post: 4th March 2008, 08:35
  5. Module to process application parameters
    By Opilki_Inside in forum General Programming
    Replies: 4
    Last Post: 8th February 2007, 23:26

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.