change:windows下主题改为windows。

This commit is contained in:
2024-10-06 22:43:49 +08:00
parent 39d4c8d307
commit 99b558b90d
3 changed files with 11 additions and 8 deletions

View File

@@ -1,22 +1,25 @@
#include <QApplication>
#include <clocale>
#include "MainWidget.h"
int main(int argc, char *argv[])
{
setlocale(LC_ALL, ".utf-8");
QApplication a(argc, argv);
#ifdef _WIN32
QFont font("Microsoft YaHei", 9);
a.setFont(font);
//a.setStyle("fusion");
a.setStyle("windows");
#endif
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif
//a.setStyle("windows");
MainWidget w;
w.set_work_exe(argv[0]);
w.show();