I am writing a Qt application for android. There is a task, along with the release of the application, to transfer the ready-made QSettings data set so that the application already has ready-made presets on the first launch. Standard option with default value:

settings.value("data", defaultData) 

will not work because the data is relatively complex.

    1 answer 1

    According to the documentation http://doc.qt.io/qt-4.8/qsettings.html#details

    On UNIX systems, in many applications (including the KDE applications) use INI text files. That is, it is possible to deliver with a ready ini file.

    If this is not enough, you can use custom storage format http://doc.qt.io/qt-4.8/qsettings.html#registerFormat

    The example deals with storage in xml format

    PS Qt is one of the best documentation system. Feel free to contact her :)

    • Thanks for the good advice to scour the documentation, but I already did. I would like to know how to upload a ready-made file to the android application when installing it. PS: On Unix systems, if the file format is used by default: $ HOME / .config / MySoft / Star Runner.conf - Amir Afendin am
    • Sorry, I just read your question like this - “how to transfer a ready-made QSettings dataset so that the application already has ready-made presets on the first launch”. Android, however, is simply a sign of a specific OS, in this case Unix. If everything is clear to you here, you should move the question to the android topic, changing it to "like a ready-made file to throw into the android application when installing it" - erapid