Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to restart Android app
Mantas.Kast last edited by
Hello, I need a way to restart Qt app. I tried use this code:
#include <QApplication> #include <QProcess> ... // restart: qApp->quit(); QProcess::startDetached(qApp->arguments(), qApp->arguments());
but it work only on Windows. However Qt doc do not say it cannot work on Android.
I also tried this example, but it's buggy. Sometimes the app restarts, but the activity do not load and app stucks on white screen.
Out of curiosity, why do you need to do that ?
Mantas.Kast last edited by Mantas.Kast
@SGaist for fun :)