diff options
author | Pierre Rossi <pierre.rossi@digia.com> | 2014-10-20 18:44:13 +0200 |
---|---|---|
committer | Pierre Rossi <pierre.rossi@gmail.com> | 2014-10-24 16:59:26 +0200 |
commit | 929509ea03b116588bdae38391377ec1ec976845 (patch) | |
tree | 9387ec91867cd7eab739ac8d164a9c81ad33c553 /src/widgets/styles/qstylesheetstyle.cpp | |
parent | 8c4deff51c8064f5a15cae0342bfa66b6663662b (diff) |
QStyleSheetStyle: Don't interfere with QFontDialog
The sample lineedit in Qt's own font dialog shouldn't have its font
affected by stylesheets.
Not only does this hampers the ability to preview the font, it actually
overrides the font selection as that one is taken directly from the
widget.
Task-number: QTBUG-41513
Change-Id: I11d0bef8c7bf7bdae4cc08b6b9276d0fc14a75fb
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Diffstat (limited to 'src/widgets/styles/qstylesheetstyle.cpp')
-rw-r--r-- | src/widgets/styles/qstylesheetstyle.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp index a9e13bad49..e9f20de842 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -5828,6 +5828,10 @@ bool QStyleSheetStyle::event(QEvent *e) void QStyleSheetStyle::updateStyleSheetFont(QWidget* w) const { + // Qt's fontDialog relies on the font of the sample edit for its selection, + // we should never override it. + if (w->objectName() == QLatin1String("qt_fontDialog_sampleEdit")) + return; QWidget *container = containerWidget(w); QRenderRule rule = renderRule(container, PseudoElement_None, PseudoClass_Active | PseudoClass_Enabled | extendedPseudoClass(container)); |