summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicswidget_p.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/graphicsview/qgraphicswidget_p.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicswidget_p.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicswidget_p.cpp b/src/gui/graphicsview/qgraphicswidget_p.cpp
index f7850ca..3466733 100644
--- a/src/gui/graphicsview/qgraphicswidget_p.cpp
+++ b/src/gui/graphicsview/qgraphicswidget_p.cpp
@@ -254,7 +254,10 @@ void QGraphicsWidgetPrivate::setFont_helper(const QFont &font)
void QGraphicsWidgetPrivate::resolveFont(uint inheritedMask)
{
+ Q_Q(QGraphicsWidget);
inheritedFontResolveMask = inheritedMask;
+ if (QGraphicsWidget *p = q->parentWidget())
+ inheritedFontResolveMask |= p->d_func()->inheritedFontResolveMask;
QFont naturalFont = naturalWidgetFont();
QFont resolvedFont = font.resolve(naturalFont);
updateFont(resolvedFont);