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.
28 lines
805 B
C++
28 lines
805 B
C++
#pragma execution_character_set("utf-8")
|
|
#include "widget.h"
|
|
|
|
#include <QApplication>
|
|
#include <QMessageBox>
|
|
#include "common.h"
|
|
#include "EasySpdLog.h"
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
QApplication a(argc, argv);
|
|
// 初始化日志类
|
|
auto loggerPath = QString(QApplication::applicationDirPath() + "/logs/log.log").toLocal8Bit();
|
|
SetLogger(loggerPath.data());
|
|
// 加载配置文件
|
|
QString filePath = QApplication::applicationDirPath() + "/config";
|
|
if (!Common::GetInstance()->loadConfig(filePath))
|
|
{
|
|
QMessageBox::warning(nullptr, "错误", "配置文件加载失败!\n 请检查配置文件是否存在或格式是否正确!");
|
|
return 0;
|
|
}
|
|
//
|
|
Widget w;
|
|
w.move(0, 0);
|
|
w.show();
|
|
return a.exec();
|
|
}
|