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) # if(${QT_VERSION_MAJOR} LESS 6)
# add_compile_options(/source-charset:utf-8) # add_compile_options(/source-charset:utf-8)
# endif() # endif()
add_compile_options(/source-charset:utf-8) #add_compile_options(/source-charset:utf-8)
add_compile_options(/EHsc) add_compile_options(/EHsc)
add_compile_options(/wd4267) add_compile_options(/wd4267)
add_compile_options(-D_CRT_SECURE_NO_WARNINGS) add_compile_options(-D_CRT_SECURE_NO_WARNINGS)

View File

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

View File

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