The second parameter of value() is a default value if the key (the first parameter) has not been found. Therefore:
qsettings->beginGroup("General");
bool status = qsettings->value("preview",false).toBool();
qsettings->endGroup();
qsettings->beginGroup("General");
bool status = qsettings->value("preview",false).toBool();
qsettings->endGroup();
To copy to clipboard, switch view to plain text mode
or
qsettings->beginGroup("General");
bool status = qsettings->value("preview",true).toBool();
qsettings->endGroup();
qsettings->beginGroup("General");
bool status = qsettings->value("preview",true).toBool();
qsettings->endGroup();
To copy to clipboard, switch view to plain text mode
If you want to check whether you are reading config.ini correctly, use the first variant.
Bookmarks