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.
AppFlow/FlowApp/FlowAPPSettings.cpp

26 lines
465 B
C++

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