qt_demoe/tool/netserver/main.cpp

31 lines
845 B
C++
Raw Normal View History

#include "frmmain.h"
2021-06-08 11:02:49 +00:00
#include "quihelper.h"
int main(int argc, char *argv[])
{
2022-01-13 03:27:55 +00:00
#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0))
QApplication::setAttribute(Qt::AA_Use96Dpi);
#endif
2021-11-28 01:09:15 +00:00
#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::Floor);
#endif
2022-01-13 03:27:55 +00:00
QApplication a(argc, argv);
a.setWindowIcon(QIcon(":/main.ico"));
//设置编码以及加载中文翻译文件
2021-11-17 07:33:19 +00:00
QUIHelper::initAll();
2021-11-17 07:33:19 +00:00
//读取配置文件
2021-04-13 01:36:22 +00:00
AppConfig::ConfigFile = QString("%1/%2.ini").arg(QUIHelper::appPath()).arg(QUIHelper::appName());
AppConfig::readConfig();
frmMain w;
2021-11-17 07:33:19 +00:00
w.setWindowTitle("网络中转服务器 V2022 (QQ: 517216493 WX: feiyangqingyun)");
w.resize(900, 650);
QUIHelper::setFormInCenter(&w);
w.show();
return a.exec();
}