#include "CFDPostAPPSettings.h" #include #include void CFDPostAPPSettings::read() { //读入文件 QString file = _appDir + "/CFDPostAPP.ini"; QFile f(file); //文件不存在则创建 if (!f.exists()) { if (f.open(QFile::WriteOnly)) { //创建文件 f.write(""); f.close(); } } //读取文件 _settings = new QSettings(file, QSettings::IniFormat); }