hi, i have a small application which builds up a connection to a digital camera. To take a photo you have to set up "releaseMode". After the desired camera operations you have to part this releaseMode to finish clean. Otherwise you couldn't enter the releaseMode again.

so i need to do some cleanup operations. How to realize this? I thought about handling the QCoreApplication::aboutToQuit() signal, but it doesn't work yet.

Here my little test application

the receiver-class

Qt Code:
  1. class Nonce : public QObject
  2. {
  3. Q_OBJECT
  4.  
  5. public:
  6. Nonce();
  7. ~Nonce();
  8.  
  9. public slots:
  10. void quitter();
  11.  
  12. };
To copy to clipboard, switch view to plain text mode 


quitter method

Qt Code:
  1. void Nonce::quitter()
  2. {
  3. std::cout << " aboutToQuit emitted "<< std::endl << std::flush;
  4. }
To copy to clipboard, switch view to plain text mode 


and a small main()

Qt Code:
  1. int main(int argc, char *argv[])
  2. {
  3. QCoreApplication a(argc, argv);
  4.  
  5. Nonce foo;
  6.  
  7. QObject::connect(&a, SIGNAL(aboutToQuit()),
  8. &foo, SLOT(quitter()));
  9.  
  10. return a.exec();
  11. }
To copy to clipboard, switch view to plain text mode 


so.. when i "kill" the programm anyway the quitter method should be started, there i want leave the releaseMode.

any Ideas where are my faults? (yeah, I am quite new to Qt)