保存一个文件,并设置一个值,其键为database path
QSettings cfg("libwin_p.dll",QSettings::IniFormat);
cfg.setValue("database path","databaseSite");
cfg.sync();
从文件读取值,并保存为指定的类型
QSettings cfg("libwin_p.dll",QSettings::IniFormat);
QString databaseSite = cfg.value("database path").toString();
QString tempexcelpath = cfg.value("excel path").toString();
bool displayframe = cfg.value("displayframe").toBool();
bool saveAsDatabase = cfg.value("saveAsDatabase").toBool();
bool saveAsExcel = cfg.value("saveAsExcel").toBool();