[Qt-interest] Returning arbitrary value?with?QApplication::exit ()

bd.anon at free.fr bd.anon at free.fr
Sat Jun 27 12:08:17 CEST 2009


Le Fri, 26 Jun 2009 22:27:35 +0200, Andreas Pakulat <apaku at gmx.de>
écrivait:

>> > > On Friday 26 June 2009 15:09:59 Andreas Pakulat wrote:
>> > > > I don't think its safe to re-create QApplication, AFAIK this can lead
>> > > > to subtle hard-to-track bugs later on.

Why not let the application close normally, and then restart it using
a simple watchdog application ?

This will work just as well, avoid any potential double QApplication
initialisation problems, with the additional useful property that your
application will restart even in case of complete failure, when you do
not terminate properly.

Of course, you would have to disable the watchdog in case you were to
actually exit the app...




More information about the Qt-interest-old mailing list