aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls/data/tst_textarea.qml
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 /tests/auto/controls/data/tst_textarea.qml
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 'tests/auto/controls/data/tst_textarea.qml')
-rw-r--r--tests/auto/controls/data/tst_textarea.qml16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_textarea.qml b/tests/auto/controls/data/tst_textarea.qml
index 7c47aa25..ea30c8d6 100644
--- a/tests/auto/controls/data/tst_textarea.qml
+++ b/tests/auto/controls/data/tst_textarea.qml
@@ -465,4 +465,20 @@ TestCase {
control.destroy()
wait(0)
}
+
+ function test_placeholderTextColor() {
+ var control = createTemporaryObject(textArea, testCase)
+ verify(control)
+
+ // usually default value should not be pure opacue black
+ verify(control.placeholderTextColor !== "#ff000000")
+ control.placeholderTextColor = "#12345678"
+ compare(control.placeholderTextColor, "#12345678")
+
+ for (var i = 0; i < control.children.length; ++i) {
+ if (control.children[i].hasOwnProperty("text"))
+ compare(control.children[i].color, control.placeholderTextColor) // placeholder.color
+ }
+ }
+
}