How to force QML Settings to write in INI format ?
I'm looking over the documentation of Settings http://doc.qt.io/qt-5/qml-qt-labs-settings-settings.html and QSettings http://doc.qt.io/qt-5/qsettings.html.
According to it, it's possible to force the Qsettings class to write the settings in an .ini file by passing
QSettings::IniFormatto the constracutor. My question is how to achive the same result with the QML settings class.
Also, where this ini file would be saved?
@Curtwagner1984 You can't, documentation is explicit about that: "The information is stored in the system registry on Windows, and in XML preferences files on macOS. On other Unix systems, in the absence of a standard, INI text files are used." QML Settings type is minimalistic, you have to do it in C++ if you want anything else.
@Eeli-K That's disappointing ... In the docs, it says it's built upon
QSettingswhich allow you to force the output format, I was hoping it is possible with
@Curtwagner1984 QSettings is a private implementation detail of Settings, I think it's mentioned only to highlight why QML Settings can't do certain things.
For my app purposes I wrapped
QObjectaccessible from QML code.
This in only one way I've known so far but I like it.
Read here: http://doc.qt.io/qt-5/qsettings.html#platform-specific-notes for places where settings file is written
@SeeLook that's a great idea, I'll try that