From 42961e50926d9c6d0e4b571a55ea2755c78ee540 Mon Sep 17 00:00:00 2001 From: Zhang Dingyuan Date: Wed, 21 Jun 2023 15:51:59 +0800 Subject: [PATCH] fix: tips font size not follow system Closed: https://github.com/linuxdeepin/developer-center/issues/4350 --- widgets/tipswidget.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/widgets/tipswidget.cpp b/widgets/tipswidget.cpp index 487e13512..0518d452e 100644 --- a/widgets/tipswidget.cpp +++ b/widgets/tipswidget.cpp @@ -7,12 +7,17 @@ #include #include #include +#include namespace Dock{ TipsWidget::TipsWidget(QWidget *parent) : QFrame(parent) , m_type(SingleLine) { + connect(qApp, &QGuiApplication::fontChanged, this, [=] { + setFont(qApp->font()); + }); + setFont(qApp->font()); } void TipsWidget::setText(const QString &text)