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/qquickcontrol.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/qquickcontrol.cpp')
-rw-r--r-- | src/quicktemplates2/qquickcontrol.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquickcontrol.cpp b/src/quicktemplates2/qquickcontrol.cpp index 34cc67a7..908c0f42 100644 --- a/src/quicktemplates2/qquickcontrol.cpp +++ b/src/quicktemplates2/qquickcontrol.cpp @@ -569,8 +569,9 @@ void QQuickControl::itemChange(QQuickItem::ItemChange change, const QQuickItem:: setHovered(false); #endif break; + case ItemSceneChange: case ItemParentHasChanged: - if (value.item) { + if ((change == ItemParentHasChanged && value.item) || (change == ItemSceneChange && value.window)) { d->resolveFont(); if (!d->hasLocale) d->updateLocale(QQuickControlPrivate::calcLocale(d->parentItem), false); // explicit=false |