[Qt-interest] Problem with aboutToClose signal

Mirko Viviani furetto76 at gmail.com
Tue Jan 19 13:44:28 CET 2010


Hi list!
I have a problem connecting the aboutToClose signal in my Windows core
application.
When hit the "X" button (close button) the slot myownclose is never executed
(nor the aboutToClose signal emitted).

Thanks to everybody!

Here the (simplified) code:

Class myHandler : QCoreApplication
{ ....
  /*construtcor */
  myHandler(int *argc, char* argv[]) : QCoreApplication(argc, argv)
  {
      ....
      connect (this, SIGNAL(aboutToClose()), this, SLOT(myownclose());
  }
 /*slot*/
void myownclose()
{
   do something
}

the main:
int main(int argc, char *argv[])

{
myHandler mywindow(argc, argv);

 mywindow server.exec();

}




-- 
-- Cav. Dott. Mirko Viviani --
GPG-PGP Public Key: 0x3191CBBB
Fingerprint: 62BA 592D EC76 4C7B 9AE7 EB66 AB6A 9E0A 3191 CBBB
***********************************************
"“Machines take me by surprise with great frequency.” A. Turing
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100119/439bc348/attachment.html 


More information about the Qt-interest-old mailing list