guidupas
22nd July 2014, 15:36
Hello!
I am trying to restart my app using the code:
QStringList args = QApplication::arguments();
args.removeFirst();
QProcess::startDetached(QApplication::applicationF ilePath(), args);
QCoreApplication::quit();
or
QProcess::startDetached(qApp->arguments()[0], qApp->arguments());
qApp->quit();
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.
I am trying to restart my app using the code:
QStringList args = QApplication::arguments();
args.removeFirst();
QProcess::startDetached(QApplication::applicationF ilePath(), args);
QCoreApplication::quit();
or
QProcess::startDetached(qApp->arguments()[0], qApp->arguments());
qApp->quit();
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.