Restart App
-
Try one of these options:
- from within the app, use QProcess::startDetached to start another instance of the app, then exit (the parent) immediately
- run the app from a kind of wrapper which restarts the app every time it exits, unless it signals somehow that it really wants to exit (e.g. exiting with a certain magic exit code, or touching some known file)
-
[quote author="rohanpm" date="1288016351"]
- from within the app, use QProcess::startDetached to start another instance of the app, then exit (the parent) immediately[/quote]
I would suggest an improvement for that:
- fork.
- in parent: terminate the app.
- in child: make a delay, so your app gets enough time to terminate and use QProcess as offered above.