aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquicktextarea_p.h
diff options
context:
space:
mode:
authorYulong Bai <yulong.bai@qt.io>2018-02-20 14:42:49 +0100
committerYulong Bai <yulong.bai@qt.io>2018-02-21 14:03:30 +0000
commit6b28a01d3f4c7c28e38b395bc3d916154bdfdcaa (patch)
tree343c7b329dfe2c4897e966755316291b8fe36cbe /src/quicktemplates2/qquicktextarea_p.h
parent8505b96fbe88980e45c0f78792ad48c02f34bfa7 (diff)
QQuickTextArea: add placeholderTextColor property
Add placeholderTextColor property for user convenience to customize the placeholderText color to fit the backgrounds. [ChangeLog][TextArea] Added placeholderTextColor property for user convenience to customize the placeholderText color to fit the backgrounds. Change-Id: Iea0233f909ca9cfe19d88f9bc24691aa35b5ab35 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquicktextarea_p.h')
-rw-r--r--src/quicktemplates2/qquicktextarea_p.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquicktextarea_p.h b/src/quicktemplates2/qquicktextarea_p.h
index 5482ceae..346438ea 100644
--- a/src/quicktemplates2/qquicktextarea_p.h
+++ b/src/quicktemplates2/qquicktextarea_p.h
@@ -74,6 +74,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickTextArea : public QQuickTextEdit
// 2.3 (Qt 5.10)
Q_PROPERTY(QPalette palette READ palette WRITE setPalette RESET resetPalette NOTIFY paletteChanged FINAL REVISION 3)
Q_CLASSINFO("DeferredPropertyNames", "background")
+ // 2.5 (Qt 5.12)
+ Q_PROPERTY(QColor placeholderTextColor READ placeholderTextColor WRITE setPlaceholderTextColor NOTIFY placeholderTextColorChanged FINAL REVISION 5)
public:
explicit QQuickTextArea(QQuickItem *parent = nullptr);
@@ -108,6 +110,10 @@ public:
void setPalette(const QPalette &palette);
void resetPalette();
+ // 2.5 (Qt 5.12)
+ QColor placeholderTextColor() const;
+ void setPlaceholderTextColor(const QColor &color);
+
Q_SIGNALS:
void fontChanged();
void implicitWidthChanged3();
@@ -123,6 +129,8 @@ Q_SIGNALS:
Q_REVISION(1) void hoverEnabledChanged();
// 2.3 (Qt 5.10)
Q_REVISION(3) void paletteChanged();
+ // 2.5 (Qt 5.12)
+ Q_REVISION(5) void placeholderTextColorChanged();
protected:
void classBegin() override;