qt_demoe/tool/comtool/main.cpp

30 lines
959 B
C++
Raw Normal View History

2019-09-29 03:06:55 +00:00
#include "frmcomtool.h"
2021-06-08 11:02:49 +00:00
#include "quihelper.h"
2019-09-29 03:06:55 +00:00
int main(int argc, char *argv[])
{
2021-11-28 01:09:15 +00:00
#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::Floor);
#endif
2019-09-29 03:06:55 +00:00
QApplication a(argc, argv);
a.setWindowIcon(QIcon(":/main.ico"));
//设置编码以及加载中文翻译文件
2021-11-17 07:33:19 +00:00
QUIHelper::initAll();
//读取配置文件
2021-04-13 01:36:22 +00:00
AppConfig::ConfigFile = QString("%1/%2.ini").arg(QUIHelper::appPath()).arg(QUIHelper::appName());
AppConfig::readConfig();
AppData::Intervals << "1" << "10" << "20" << "50" << "100" << "200" << "300" << "500" << "1000" << "1500" << "2000" << "3000" << "5000" << "10000";
AppData::readSendData();
AppData::readDeviceData();
2019-09-29 03:06:55 +00:00
frmComTool w;
2021-11-17 07:33:19 +00:00
w.setWindowTitle("串口调试助手 V2022 (QQ: 517216493 WX: feiyangqingyun)");
w.resize(900, 650);
QUIHelper::setFormInCenter(&w);
2019-09-29 03:06:55 +00:00
w.show();
return a.exec();
}