From a62c77621bf431d797c1f6e0cad2ec08cc938a37 Mon Sep 17 00:00:00 2001 From: iaom Date: Fri, 15 Jul 2022 11:47:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=AD=A3=E5=88=99=E8=A1=A8?= =?UTF-8?q?=E8=BE=BE=E5=BC=8F=E8=BD=AC=E4=B9=89=EF=BC=8C=E9=81=BF=E5=85=8D?= =?UTF-8?q?=E5=81=B6=E7=8E=B0=E7=9A=84=E6=90=9C=E7=B4=A2UI=E5=8D=A1?= =?UTF-8?q?=E6=AD=BB=E7=8E=B0=E8=B1=A1=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/view/result-view-delegate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/view/result-view-delegate.cpp b/frontend/view/result-view-delegate.cpp index 3bc81b5..495acf0 100644 --- a/frontend/view/result-view-delegate.cpp +++ b/frontend/view/result-view-delegate.cpp @@ -209,6 +209,7 @@ void ResultItemStyle::drawControl(QStyle::ControlElement element, const QStyleOp HightLightEffectHelper::HightLightEffectHelper(QObject *parent) : QSyntaxHighlighter(parent) { m_expression.setCaseSensitivity(Qt::CaseInsensitive); + m_expression.setPatternSyntax(QRegExp::FixedString); } void HightLightEffectHelper::setExpression(const QString &text) @@ -224,7 +225,6 @@ void HightLightEffectHelper::setTextColor(const QBrush &brush) void HightLightEffectHelper::highlightBlock(const QString &text) { setFormat(0, text.length(), m_textCharFormat); - m_textCharFormat.setFontWeight(QFont::Bold); int index = text.indexOf(m_expression); while(index >= 0){