Hello!
I am trying to restart my app using the code:
args.removeFirst();
QStringList args = QApplication::arguments();
args.removeFirst();
QProcess::startDetached(QApplication::applicationFilePath(), args);
QCoreApplication::quit();
To copy to clipboard, switch view to plain text mode
or
QProcess::startDetached(qApp
->arguments
()[0], qApp
->arguments
());
qApp->quit();
QProcess::startDetached(qApp->arguments()[0], qApp->arguments());
qApp->quit();
To copy to clipboard, switch view to plain text mode
It works fine when I run it in Qt, but when I build it, generate the .pkg and install it does not restart and when I reopen the app it gives a message that the app was finished during windows reopen.
I am using OSX 10.9
Thanks very much.
Bookmarks