aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls/data/tst_textfield.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-06-29 10:53:01 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-06-29 13:22:48 +0000
commita07606a56b1bc8d277ef5cfc394178b660a0c30c (patch)
treed0c567613ec0149f09ef77662144b2e72b2472fb /tests/auto/controls/data/tst_textfield.qml
parentf379e58bf51f1b32782a54f455401b86c83c3ee4 (diff)
Add hover support to TextArea & TextField
Task-number: QTBUG-50003 Change-Id: Ie101ba8840fba2a7503da8de77d9cf2a3c91d562 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto/controls/data/tst_textfield.qml')
-rw-r--r--tests/auto/controls/data/tst_textfield.qml22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_textfield.qml b/tests/auto/controls/data/tst_textfield.qml
index 012dedba..18bcd63f 100644
--- a/tests/auto/controls/data/tst_textfield.qml
+++ b/tests/auto/controls/data/tst_textfield.qml
@@ -144,4 +144,26 @@ TestCase {
control.destroy()
}
+
+ function test_hover_data() {
+ return [
+ { tag: "enabled", hoverEnabled: true },
+ { tag: "disabled", hoverEnabled: false },
+ ]
+ }
+
+ function test_hover(data) {
+ var control = textField.createObject(testCase, {hoverEnabled: data.hoverEnabled})
+ verify(control)
+
+ compare(control.hovered, false)
+
+ mouseMove(control)
+ compare(control.hovered, data.hoverEnabled)
+
+ mouseMove(control, -1, -1)
+ compare(control.hovered, false)
+
+ control.destroy()
+ }
}