From 0d7c13ac7bd0dd7531def39e706fa38b71598279 Mon Sep 17 00:00:00 2001 From: yanglan Date: Wed, 3 Jan 2024 18:08:30 +0800 Subject: [PATCH] feature(adapt): Modified some code to adapt to KY3.3-6-PG's environment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改代码适配KY3.3-6-PG的环境 Signed-off-by: yanglan --- style-helper/src/font-size-manager-private.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/style-helper/src/font-size-manager-private.h b/style-helper/src/font-size-manager-private.h index eccf04b..3c018ba 100644 --- a/style-helper/src/font-size-manager-private.h +++ b/style-helper/src/font-size-manager-private.h @@ -25,7 +25,13 @@ public: void init() { +#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)) connect(qGuiApp, &QGuiApplication::fontChanged, this, &FontSizeManagerPrivate::handleGuiAppFontChanged); +#else + connect(qGuiApp, &QGuiApplication::fontDatabaseChanged, [this](){ + this->handleGuiAppFontChanged(qGuiApp->font()); + }); +#endif #if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)) connect(&m_destorySignalMapper, &QSignalMapper::mappedWidget, this, &FontSizeManagerPrivate::handleBindWidgetDestroyed); #else @@ -71,4 +77,4 @@ private: QSignalMapper m_destorySignalMapper; }; -} // namespace Kiran \ No newline at end of file +} // namespace Kiran -- 2.27.0