[solved] Restart a Qt application
-
wrote on 26 May 2011, 09:57 last edited by
What would be the proper way to restart a Qt application.
After a fatal error the application should offer an option to restarting itself again and I was wondering how this should be done in Qt? -
wrote on 26 May 2011, 10:13 last edited by
I actually use this:
@
void MyApp::restartApp()
{
QProcess::startDetached(QApplication::applicationFilePath());
exit(12);
}
@ -
wrote on 15 Jun 2011, 15:19 last edited by
Thank you!
This is exactly what I was looking for. -
wrote on 13 Jan 2012, 11:11 last edited by
works perfectly.Cheers
-
wrote on 30 Oct 2013, 08:53 last edited by
Try to inherit QQuickItem instead of QObject. It is the default for creating QML Objects with QtQuick 2