我希望 qtsettings 加载并保存配置文件类对象,如以下列表所示
[profiles]
[profilename1]
data
[profilename2]
data
QSettings settings("myapp.ini", QSettings::IniFormat);
settings.beginGroup("profiles");
settings.beginGroup("profilename1");
settings.setValue("value", QString("data"));
settings.endGroup();
settings.beginGroup("profilename2");
settings.setValue("value", QString("data"));
settings.endGroup();
settings.endGroup();