aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquicklabel.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-09-11 11:56:39 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2017-09-11 11:32:02 +0000
commitd3aef722da533c3b100ba653498c79986a44c9f9 (patch)
tree57e4ab278c69271e8d956d233037c93803123084 /src/quicktemplates2/qquicklabel.cpp
parentdc39818207439a62a97179b8d2ad22ef49521148 (diff)
Fix font inheritance
In item views, it can happen during incubation that a control doesn't yet have a window associated when the parent item changes. Therefore we must make sure to resolve the font when the window changes. Task-number: QTBUG-63119 Change-Id: I890f70ae6faa232dcc2c094ccec02e76b371d2cb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquicklabel.cpp')
-rw-r--r--src/quicktemplates2/qquicklabel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquicklabel.cpp b/src/quicktemplates2/qquicklabel.cpp
index 45c7e5a4..d1ddfbd6 100644
--- a/src/quicktemplates2/qquicklabel.cpp
+++ b/src/quicktemplates2/qquicklabel.cpp
@@ -231,7 +231,7 @@ void QQuickLabel::itemChange(QQuickItem::ItemChange change, const QQuickItem::It
{
Q_D(QQuickLabel);
QQuickText::itemChange(change, value);
- if (change == ItemParentHasChanged && value.item)
+ if ((change == ItemParentHasChanged && value.item) || (change == ItemSceneChange && value.window))
d->resolveFont();
}