解决系统字体变化时UI未能及时更新的问题

This commit is contained in:
iaom 2022-12-30 13:52:33 +08:00
parent c3fadf77c2
commit 5254c49ffa
1 changed files with 2 additions and 0 deletions

View File

@ -7,6 +7,8 @@ ResultViewDelegate::ResultViewDelegate(QObject *parent) : QStyledItemDelegate(pa
m_textDoc(new QTextDocument(this)),
m_hightLightEffectHelper(new HightLightEffectHelper(this))
{
m_textDoc->setDefaultFont(QApplication::font());
connect(qApp, &QApplication::fontChanged, m_textDoc, &QTextDocument::setDefaultFont);
}
void ResultViewDelegate::setSearchKeyword(const QString &regFindKeyWords)