diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-09-11 11:56:39 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-09-11 11:32:02 +0000 |
commit | d3aef722da533c3b100ba653498c79986a44c9f9 (patch) | |
tree | 57e4ab278c69271e8d956d233037c93803123084 /src/quicktemplates2/qquicklabel.cpp | |
parent | dc39818207439a62a97179b8d2ad22ef49521148 (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.cpp | 2 |
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(); } |