I have a config.ini in my project.The content is
[Info]
username = "admin"
I wanna to change "/Info/username" like this:
QSettings *config = new QSettings(":/config/config.ini", QSettings::IniFromat);
QString username = "myname";
config->setValue("/Info/username", username);
Then I qDebug the value of username
qDebug() << config.value("/Info/username").toString();
It will be ok, the value of username in control is "myname",but when I check config.ini, I find it still is "username".That means the change of value isn't save to config.ini permanently.
How can I save my changes of value to config.ini permanently?