aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-10-12 10:04:34 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2017-10-12 09:30:10 +0000
commitb8141609d2ee962b919e1f05f7bd12ebc2ca9d11 (patch)
treee881cfcad5e98a8cf38efe77f8962cad5232d1de /tests/auto
parent0007db13236fcee4ca90b885a67cc7de0f40836d (diff)
QQuickToolTip: disable hover
Tooltips are special popups that should not block hover, because it conflicts with the typical condition for showing tooltips on desktop platforms. Task-number: QTBUG-63644 Change-Id: Ie974aed23a7df8e4b926bec5fe717cb909d15842 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/controls/data/tst_tooltip.qml31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_tooltip.qml b/tests/auto/controls/data/tst_tooltip.qml
index c7973c69..a2078e09 100644
--- a/tests/auto/controls/data/tst_tooltip.qml
+++ b/tests/auto/controls/data/tst_tooltip.qml
@@ -294,4 +294,35 @@ TestCase {
keyPress(Qt.Key_A)
compare(shortcutActivatedSpy.count, 1)
}
+
+ Component {
+ id: hoverComponent
+ MouseArea {
+ id: hoverArea
+ property alias tooltip: tooltip
+ hoverEnabled: true
+ width: testCase.width
+ height: testCase.height
+ ToolTip {
+ id: tooltip
+ x: 10; y: 10
+ width: 10; height: 10
+ visible: hoverArea.containsMouse
+ }
+ }
+ }
+
+ // QTBUG-63644
+ function test_hover() {
+ var root = createTemporaryObject(hoverComponent, testCase)
+ verify(root)
+
+ var tooltip = root.tooltip
+ verify(tooltip)
+
+ for (var pos = 0; pos <= 25; pos += 5) {
+ mouseMove(root, pos, pos)
+ verify(tooltip.visible)
+ }
+ }
}