1 Star 0 Fork 27

netdebug / HaibinSerialPortDebuger

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.cpp 1011 Bytes
一键复制 编辑 原始数据 按行查看 历史
thb 提交于 2019-07-16 10:00 . 基本完成功能
#include <QApplication>
#include <QTextCodec>
#include <QFile>
#include <QDebug>
#include "MessageBox.h"
#include "MainWidget.h"
#include "config.h"
#include "MainWindow.h"
int main(int argc, char* argv[])
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,6,0))
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif
QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));
QApplication app(argc, argv);
//加载css
QFile file(":/ui/css/lightblue.css");
if(file.open(QFile::ReadOnly))
{
QString qss = QLatin1String(file.readAll());
QString paletteColor = qss.mid(20, 7);
app.setPalette(QPalette(QColor(paletteColor)));
app.setStyleSheet(qss);
file.close();
}
else
{
qDebug() << file.errorString();
}
app.setFont(QFont(FontName, FontSize));
MainWidget* w = new MainWidget;
MainWindow* mainWindow = new MainWindow(w);
w->setMainWindow(mainWindow);
w->show();
return app.exec();
}
C++
1
https://gitee.com/netdebug/HaibinSerialPortDebuger.git
git@gitee.com:netdebug/HaibinSerialPortDebuger.git
netdebug
HaibinSerialPortDebuger
HaibinSerialPortDebuger
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891