QByteArray is serialized in different formats on the file system if another version of the Qt library is used (say 4.5.2 versus 4.7.1). I use QSettings in my application to store some binary data in a file .ini. Now the application is ported to Qt 4.7.1, and if the updated version of the application reads (using the QSettings value method ), the QByteArray provided is not equal to the application serialized by the previous version.
Possible Solution:
support the Qt version used by the application (I save the version of the application in the settings)
implement custom QSettings format (shell for ini-format) using native ReadFunc and WriteFunc.
read / write QByteArray using QDataStream in setVersion using a supported version of Qt.
Simpler solutions?
source
share