From 2511c5dba85fccf9899f69910b021bd79aefcd6b Mon Sep 17 00:00:00 2001 From: Mentalflow <312902918@qq.com> Date: Thu, 20 Apr 2023 11:08:13 +0800 Subject: [PATCH] Fix crash in macOS. --- example/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/example/main.cpp b/example/main.cpp index 52ba0c31..9c5b8541 100644 --- a/example/main.cpp +++ b/example/main.cpp @@ -13,7 +13,9 @@ int main(int argc, char *argv[]) //将样式设置为Basic,不然会导致组件显示异常 qputenv("QT_QUICK_CONTROLS_STYLE","Basic"); //6.4及以下监听系统深色模式变化 +#ifdef Q_OS_WIN qputenv("QT_QPA_PLATFORM","windows:darkmode=2"); +#endif QGuiApplication::setOrganizationName("ZhuZiChu"); QGuiApplication::setOrganizationDomain("https://zhuzichu520.github.io"); QGuiApplication::setApplicationName("FluentUI");