From 43f632f2617bd8748fdca605e2fe0b4b67649324 Mon Sep 17 00:00:00 2001 From: Dylan Liu <312902918@qq.com> Date: Thu, 6 Jul 2023 11:50:05 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20the=20bug=20of=20unregistered=C2=A0dataty?= =?UTF-8?q?pe=20QuickGlobal::SystemTheme=20in=20Qt=205.=20(#240)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/quick/framelessquickmodule.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/quick/framelessquickmodule.cpp b/src/quick/framelessquickmodule.cpp index 3f72968d..112b1b31 100644 --- a/src/quick/framelessquickmodule.cpp +++ b/src/quick/framelessquickmodule.cpp @@ -91,7 +91,13 @@ void FramelessHelper::Quick::registerTypes(QQmlEngine *engine) return new FramelessQuickUtils; }); qmlRegisterAnonymousType(QUICK_URI_SHORT); - +#if (QT_VERSION <= QT_VERSION_CHECK(5, 16, 0)) + qRegisterMetaType("QuickGlobal::SystemTheme"); + qRegisterMetaType("QuickGlobal::SystemButtonType"); + qRegisterMetaType("QuickGlobal::ButtonState"); + qRegisterMetaType("QuickGlobal::BlurMode"); + qRegisterMetaType("QuickGlobal::WindowEdge"); +#endif qmlRegisterType(QUICK_URI_EXPAND("FramelessHelper")); qmlRegisterType(QUICK_URI_EXPAND("MicaMaterial")); qmlRegisterType(QUICK_URI_EXPAND("ImageItem"));