To restart application, try:
#include <QApplication>
#include <QProcess>
...
// restart:
qApp->quit();
QProcess::startDetached(qApp->arguments()[0], qApp->arguments());
More Related Contents:
- Serialization with Qt
- Qt: resizing a QLabel containing a QPixmap while keeping its aspect ratio
- Make QWidget transparent
- Slot is being called multiple times every time a signal is emitted
- Distinguish between single and double click events in Qt
- Console output in a Qt GUI app?
- Is it possible to connect a signal to a static slot without a receiver instance?
- Qt – remove all widgets from layout?
- Adding signals/slots (QObject) to QGraphicsItem: performance hit?
- How to “Reveal in Finder” or “Show in Explorer” with Qt
- Two colours text in QPushButton
- Why QFile(“./test”) work though [Class QFile] has no QFile(char* s) constructor
- Connecting overloaded signals and slots in Qt 5
- How to use the Qt’s PIMPL idiom?
- the procedure entry point __gxx_personality_v0 could not be located
- Qt5 Static Build yields Failed to load platform plugin “windows”
- C++ Qt signal and slot not firing
- How to change string into QString?
- GIF animation in Qt
- Is there any way to building static Qt with static OpenSSL?
- Windows C++ compiler with full C++11 support (should work with Qt) [closed]
- Command working in terminal, but not via QProcess
- Changing locale in Qt
- Changing DPI scaling size of display make Qt application’s font size get rendered bigger
- QScrollArea with dynamically changing contents
- Columns auto-resize to size of QTableView
- How to call function after window is shown?
- QT QWebEnginePage::setWebChannel() transport object
- Do I get a finished slot if I start QProcess using startDetached
- Sort filenames naturally with Qt