首页 > 代码库 > QSettings读写问题

QSettings读写问题

/*    QSettings 读写顺序要保持一致,否则可能会出现读失败问题*/// 读QSettings *databaseSetting = new QSettings("combinefile/profile.ini",QSettings::IniFormat);dbprofile.filter = databaseSetting->value ("common/filter").toString ();timeInterval = databaseSetting->value ("common/timeInterval").toInt ();delete databaseSetting;// 写QSettings *databaseSetting = new QSettings("combinefile/profile.ini",QSettings::IniFormat);databaseSetting->setValue("common/filter", filterStr);databaseSetting->setValue("common/timeInterval", time);delete databaseSetting;

  

QSettings读写问题