← Notes

Use QVariants instead of defining classes for QSettings

If you ever need to work on QSettings to store config variables in a Qt application, DON’T worry about designing class for saving and retrieving different data-types. Use QVariants.

Refer to this discussion.

If you are introducing version control to your file storage, remember that git commit would not work if this file is opened in ‘w’(write mode) in any part of program. Remeber to close the opened reference, so the most recent changes are committed.