how to restart my own qt application?

Klaus picture Klaus · Feb 26, 2011 · Viewed 26.7k times · Source

i just asking myself how to restart my own qt application?

Can somebody please show me an example?

Answer

masoud picture masoud · Oct 30, 2011

To restart application, try:

#include <QApplication>
#include <QProcess>

...

// restart:
qApp->quit();
QProcess::startDetached(qApp->arguments()[0], qApp->arguments());