diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-11-18 13:58:15 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-12-01 15:04:28 +0000 |
commit | 5823d6230f5b1fbbd27c3b00b334e062a21b3d65 (patch) | |
tree | 1bdaa7d71cb6900dec97415a7bb3b91b82984143 /src/templates/qquickcontrol.cpp | |
parent | 0928dc2924e09a38c58513d82887e6d75a112eb0 (diff) |
Control: resolve the font a bit earlier
Also applied to QQuickLabel, QQuickTextArea and QQuickTextField.
Change-Id: Icf10500905980445809eb2375e8957db2c41e03c
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/templates/qquickcontrol.cpp')
-rw-r--r-- | src/templates/qquickcontrol.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/templates/qquickcontrol.cpp b/src/templates/qquickcontrol.cpp index 0de24493..908abeda 100644 --- a/src/templates/qquickcontrol.cpp +++ b/src/templates/qquickcontrol.cpp @@ -342,11 +342,18 @@ QQuickControl::QQuickControl(QQuickControlPrivate &dd, QQuickItem *parent) : { } +void QQuickControl::classBegin() +{ + Q_D(QQuickControl); + QQuickItem::classBegin(); + d->resolveFont(); +} + void QQuickControl::itemChange(QQuickItem::ItemChange change, const QQuickItem::ItemChangeData &value) { Q_D(QQuickControl); QQuickItem::itemChange(change, value); - if (change == ItemParentHasChanged) + if (change == ItemParentHasChanged && isComponentComplete()) d->resolveFont(); } |