#pragma execution_character_set("utf-8") #include "widget.h" #include #include #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(); }