aboutsummaryrefslogtreecommitdiffstats
path: root/src/controls/qquicktextarea_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/qquicktextarea_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/qquicktextarea_p.h')
-rw-r--r--src/controls/qquicktextarea_p.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/controls/qquicktextarea_p.h b/src/controls/qquicktextarea_p.h
index f952f304..239fa559 100644
--- a/src/controls/qquicktextarea_p.h
+++ b/src/controls/qquicktextarea_p.h
@@ -60,6 +60,7 @@ class QQuickMouseEvent;
class Q_QUICKCONTROLS_EXPORT QQuickTextArea : public QQuickTextEdit
{
Q_OBJECT
+ Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged) // override
Q_PROPERTY(QQuickItem *background READ background WRITE setBackground NOTIFY backgroundChanged FINAL)
Q_PROPERTY(QQuickText *placeholder READ placeholder WRITE setPlaceholder NOTIFY placeholderChanged FINAL)
@@ -67,6 +68,9 @@ public:
explicit QQuickTextArea(QQuickItem *parent = Q_NULLPTR);
~QQuickTextArea();
+ QFont font() const;
+ void setFont(const QFont &font);
+
QQuickItem *background() const;
void setBackground(QQuickItem *background);
@@ -74,6 +78,7 @@ public:
void setPlaceholder(QQuickText *placeholder);
Q_SIGNALS:
+ void fontChanged();
void backgroundChanged();
void placeholderChanged();
void pressAndHold(QQuickMouseEvent *event);