Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Implement application watchdog timer
dhu0504 last edited by
I need to implement application watch dog timer in Qt.
When application is hanged, need to restart the application.
How can i implement it in Qt.
Any ideas, will be helpful.
Thanks in advance
koahnig last edited by
You can use QTimer to start on a regular basis your watch dog.
One thing you need to be careful of is the event loop. When your application is blocking from some mal-function within a slot routine started by the same event loop, you have lost. The event loop will have no chance to execute your watch dog event.
Either you are using an additional thread or an external application with some communication between those applications or other means to track the state of the application.