From 99b558b90d287f09967f97ffa04293457ef3416f Mon Sep 17 00:00:00 2001 From: taynpg Date: Sun, 6 Oct 2024 22:43:49 +0800 Subject: [PATCH] =?UTF-8?q?change=EF=BC=9Awindows=E4=B8=8B=E4=B8=BB?= =?UTF-8?q?=E9=A2=98=E6=94=B9=E4=B8=BAwindows=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 2 +- MainWidget.ui | 12 ++++++------ main.cpp | 5 ++++- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 05bc45d..850ac40 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/MainWidget.ui b/MainWidget.ui index 5712eae..9336959 100644 --- a/MainWidget.ui +++ b/MainWidget.ui @@ -6,8 +6,8 @@ 0 0 - 1102 - 682 + 1139 + 591 @@ -87,7 +87,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -142,7 +142,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -228,7 +228,7 @@ - Qt::Horizontal + Qt::Orientation::Horizontal @@ -248,7 +248,7 @@ - Qt::Horizontal + Qt::Orientation::Horizontal diff --git a/main.cpp b/main.cpp index 843ec62..915d21b 100644 --- a/main.cpp +++ b/main.cpp @@ -1,22 +1,25 @@ #include +#include #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();