2020-05-24 08:39:32 +00:00
|
|
|
|
#include "frmmain.h"
|
2023-10-17 03:31:58 +00:00
|
|
|
|
#include "qthelper.h"
|
2020-05-24 08:39:32 +00:00
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2020-05-24 08:39:32 +00:00
|
|
|
|
QApplication a(argc, argv);
|
|
|
|
|
a.setWindowIcon(QIcon(":/main.ico"));
|
|
|
|
|
|
|
|
|
|
//设置编码以及加载中文翻译文件
|
2023-10-17 03:31:58 +00:00
|
|
|
|
QtHelper::initAll();
|
2020-05-24 08:39:32 +00:00
|
|
|
|
|
2021-11-17 07:33:19 +00:00
|
|
|
|
//读取配置文件
|
2023-10-17 03:31:58 +00:00
|
|
|
|
AppConfig::ConfigFile = QString("%1/%2.ini").arg(QtHelper::appPath()).arg(QtHelper::appName());
|
2021-04-13 01:36:22 +00:00
|
|
|
|
AppConfig::readConfig();
|
2020-05-24 08:39:32 +00:00
|
|
|
|
|
|
|
|
|
frmMain w;
|
2023-10-17 03:31:58 +00:00
|
|
|
|
w.setWindowTitle("网络中转服务器 V2023 (QQ: 517216493 WX: feiyangqingyun)");
|
2021-11-17 07:33:19 +00:00
|
|
|
|
w.resize(900, 650);
|
2023-10-17 03:31:58 +00:00
|
|
|
|
QtHelper::setFormInCenter(&w);
|
2020-05-24 08:39:32 +00:00
|
|
|
|
w.show();
|
|
|
|
|
|
|
|
|
|
return a.exec();
|
|
|
|
|
}
|