Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Maintaining the state of application
Kira last edited by
Is there a mechanism in qt to preserve the state of the application
For example i have a camera device scanning a platform and suddenly the power goes off.
How can i continue the scanning from that point or maintain the state of application to start from
JonB last edited by
There is no standard technology for "Maintaining the state of application". Qt neither helps nor hinders this. I don't know about the specifics of your scanning, but it is up to you, the programmer, to save whatever state you need as you go along and to write code which uses that to restart from a similar situation.
You can get help by using
but any state that is related to app related activities must be handled manually.
Often QSetting class is used to store the settings store in.
fcarney last edited by
If you have definite progress points and can verify those points. Then you can simply have your program look for a job in progress and continue from that point on restart. I had a script I wrote in Python. It would look at the filenames in a directory. If they existed it would start after the last file to start processing data again. So you could have incremental saved files for something like this.
Another option is running this from a laptop and/or ups.