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