diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-06-29 10:53:01 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-06-29 13:22:48 +0000 |
commit | a07606a56b1bc8d277ef5cfc394178b660a0c30c (patch) | |
tree | d0c567613ec0149f09ef77662144b2e72b2472fb /tests/auto/controls/data/tst_textfield.qml | |
parent | f379e58bf51f1b32782a54f455401b86c83c3ee4 (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.qml | 22 |
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() + } } |