<< to CrossControl homepage

Support & Service Center

Qt - Persistent variables

Printer-friendly versionPrinter-friendly versionPDF versionPDF version

The posted example below shows how to use the QSettings class in Qt to setup persistent variables. Persistent variables will persist or keep their value past a display restart or shutdown. This is very helpful for variables you want your application to remember or keep past shutdowns. This could be something like a user password or a user profile. You don't want the password a user setup or their profile to be reset at each display shutdown which would require the user to re-enter the values each time the display is shutdown. For these variables you can set them as persistent variables and have the display remember their last value.

To use the example, download and copy the attached .tar file into the Virtual Machine. Extract the files and open the .pro file in Qt. Build and run. This example should work for both ARM and x86 based devices although the x86 kit will need to be added and the application recompiled for x86 devices.



AttachmentSize
Binary Data persistent_variables_demo.tar_.gz166.98 KB
whatever