You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AppFlowPost/CFDPostAPP/CFDPostAPPSettings.cpp

26 lines
474 B
C++

#include "CFDPostAPPSettings.h"
#include <QSettings>
#include <QFile>
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);
}