diff options
Diffstat (limited to 'tests/auto/controls/data/tst_tooltip.qml')
-rw-r--r-- | tests/auto/controls/data/tst_tooltip.qml | 31 |
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 bd46fabd..e7cc6787 100644 --- a/tests/auto/controls/data/tst_tooltip.qml +++ b/tests/auto/controls/data/tst_tooltip.qml @@ -298,4 +298,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) + } + } } |