aboutsummaryrefslogtreecommitdiffstats
path: root/src/controls/qquickcontrol_p_p.h
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-09-02 10:32:47 +0200
committerLiang Qi <liang.qi@theqtcompany.com>2015-09-02 12:12:23 +0000
commit0addfd5d586c7850c1e470f24c6364e6305dfa08 (patch)
treea1765680b89890e7b2de873aab7d1b47b072a621 /src/controls/qquickcontrol_p_p.h
parente3c86bd3185e288ce23a0ff07084cd0def54e898 (diff)
QQuickControl: add font property
When the font of a QQuickControl subclass is set, it will propagate it to all children that are also derived from QQuickControl, as well as TextField and TextArea. Change-Id: I7c851f84b89609094d9a81d239ade0f0ac212985 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/controls/qquickcontrol_p_p.h')
-rw-r--r--src/controls/qquickcontrol_p_p.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/controls/qquickcontrol_p_p.h b/src/controls/qquickcontrol_p_p.h
index 273ca6c9..2861c067 100644
--- a/src/controls/qquickcontrol_p_p.h
+++ b/src/controls/qquickcontrol_p_p.h
@@ -69,6 +69,17 @@ public:
void resizeBackground();
void resizeContent();
+ void updateFont(const QFont &);
+ static void updateFontRecur(QQuickItem *item, const QFont &);
+ inline void setFont_helper(const QFont &f) {
+ if (font.resolve() == f.resolve() && font == f)
+ return;
+ updateFont(f);
+ }
+ void resolveFont();
+ static QFont naturalControlFont(const QQuickItem *);
+
+ QFont font;
bool hasTopPadding;
bool hasLeftPadding;
bool hasRightPadding;