Greetings. There is a code: serializing application settings made like QProperty into an ini file (because they told me that the registry is a bad style).
Settings = new QSettings(QSettings::IniFormat, QSettings::UserScope, QApplication::organizationName(), QApplication::applicationName()); QString path = Settings->fileName(); and a little later:
const QMetaObject *metaobject = metaObject(); int count = metaobject->propertyCount(); for (int i = 0; i<count; ++i) { QMetaProperty metaproperty = metaobject->property(i); const char *name = metaproperty.name(); QVariant value = property(name); QString Key = QString(name); Settings->setValue(Key, value); } In the path variable, the path to the ini file is:
path = C: / Users / ILIA / AppData / Roaming / Highway Software / Vesta 2016.ini
From the Russian letters in the ways I left a long time. The file is not created. I thought there was no permission to write, I started it from under Visual Studio 2013 running from the administrator - there is no result. So that you do not think that I did not find the file, I searched for it through Everything with a query:
*vesta*.ini where vesta is the name of the application, it is not. What's the matter? All information is written to the registry (although not always, I did not overcome it).