summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-01-16 11:44:20 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-01-16 11:48:55 +0100
commite2a546a18be88f380b3d9d3efbed390fe1a9e93f (patch)
treef7a6a0c7a60ee7b771ee9d6256c385f761113135 /src/widgets/styles
parent0be8f59d725d4a5e79709487e3aac1d351a6c04c (diff)
parent99b89d30fa5484c5d1f3cbda828648c28af4fb7d (diff)
Merge remote-tracking branch 'origin/5.9' into 5.10
Diffstat (limited to 'src/widgets/styles')
-rw-r--r--src/widgets/styles/qstylesheetstyle.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index 494b28c909..9d5a117aa0 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -3649,6 +3649,8 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
QFont oldFont = p->font();
if (subRule.hasFont)
p->setFont(subRule.font.resolve(p->font()));
+ else
+ p->setFont(mi.font);
// We fall back to drawing with the style sheet code whenever at least one of the
// items are styled in an incompatible way, such as having a background image.
@@ -3765,8 +3767,7 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
}
}
- if (subRule.hasFont)
- p->setFont(oldFont);
+ p->setFont(oldFont);
return;
}