qt_demoe/comtool/main.cpp

33 lines
1007 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[])
{
QApplication a(argc, argv);
a.setWindowIcon(QIcon(":/main.ico"));
QFont font;
font.setFamily(QUIConfig::FontName);
font.setPixelSize(QUIConfig::FontSize);
a.setFont(font);
//设置编码以及加载中文翻译文件
QUIHelper::setCode();
QUIHelper::setTranslator(":/qt_zh_CN.qm");
QUIHelper::setTranslator(":/widgets.qm");
QUIHelper::initRand();
2021-04-13 01:36:22 +00:00
AppConfig::Intervals << "1" << "10" << "20" << "50" << "100" << "200" << "300" << "500" << "1000" << "1500" << "2000" << "3000" << "5000" << "10000";
AppConfig::ConfigFile = QString("%1/%2.ini").arg(QUIHelper::appPath()).arg(QUIHelper::appName());
AppConfig::readConfig();
AppConfig::readSendData();
AppConfig::readDeviceData();
2019-09-29 03:06:55 +00:00
frmComTool w;
w.setWindowTitle("串口调试助手 V2021 (QQ: 517216493 WX: feiyangqingyun)");
QUIHelper::setFormInCenter(&w);
2019-09-29 03:06:55 +00:00
w.show();
return a.exec();
}