From a07606a56b1bc8d277ef5cfc394178b660a0c30c Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Wed, 29 Jun 2016 10:53:01 +0200 Subject: Add hover support to TextArea & TextField Task-number: QTBUG-50003 Change-Id: Ie101ba8840fba2a7503da8de77d9cf2a3c91d562 Reviewed-by: Mitch Curtis --- tests/auto/controls/data/tst_textfield.qml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'tests/auto/controls/data/tst_textfield.qml') 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() + } } -- cgit v1.2.3