change:windows下主题改为windows。

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

View File

@ -52,7 +52,7 @@ if (MSVC)
# if(${QT_VERSION_MAJOR} LESS 6)
# add_compile_options(/source-charset:utf-8)
# endif()
add_compile_options(/source-charset:utf-8)
#add_compile_options(/source-charset:utf-8)
add_compile_options(/EHsc)
add_compile_options(/wd4267)
add_compile_options(-D_CRT_SECURE_NO_WARNINGS)

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>1102</width>
<height>682</height>
<width>1139</width>
<height>591</height>
</rect>
</property>
<property name="windowTitle">
@ -87,7 +87,7 @@
<item>
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Vertical</enum>
<enum>Qt::Orientation::Vertical</enum>
</property>
</widget>
</item>
@ -142,7 +142,7 @@
<item>
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
<enum>Qt::Orientation::Vertical</enum>
</property>
</widget>
</item>
@ -228,7 +228,7 @@
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@ -248,7 +248,7 @@
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>

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();