1 2 3 4 5 | QSettings cfg(CONFIG_INI_PATH, QSettings::IniFormat); cfg.beginGroup("general"); // <-- other keywords are all ok. std::string val = cfg.value("itemCount").toString().toStdString(); int video_count = cfg.value("itemCount").toInt(); cfg.endGroup(); |
'general' keyword will lead 'val' to output empty in Qt5.15.2.