[Qt-interest] QCoreApplication derived class' slots not being called

Thiago Macieira thiago.macieira at trolltech.com
Sat Jan 24 17:23:58 CET 2009


Andrea Franceschini wrote:
>2009/1/23 Thiago Macieira <thiago.macieira at trolltech.com>:
>> But I haven't seen anything that would require reimplementing exec().
>> You can use the standard one from QCoreApplication.
>
>Of course I'd like to, but how? At the moment I'm doing something like
>
>int main(int argc, char** argv) {
>   Application a(argc, argv);
>   a.exec();
>   return 0;
>}
>
>and without reimplementing exec() in my derived class, the application
>would simply quit.

If that Application class derives from QCoreApplication (not from 
QApplication), then the only way that it exits from exec() is if you 
specifically tell it to, by calling exit() or the quit() slot. So, find 
out what called those functions, since that's your issue.

Also, why are you deriving from QCoreApplication? It shouldn't be 
necessary: use QCoreApplication directly.

-- 
Thiago Macieira - thiago.macieira (AT) nokia.com
  Senior Software Engineer - Nokia, Qt Software
  Qt Software is hiring - ask me
      Sandakerveien 116, NO-0402 Oslo, Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090124/73949361/attachment.bin 


More information about the Qt-interest-old mailing list