diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-10-22 22:18:32 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-10-22 22:20:46 +0200 |
commit | d1990ff285a8a265fc41d193179ce8fb6746f7b3 (patch) | |
tree | d4e78a873de079a04d2b4d64d81e4a4af84b3ae7 /tests/auto/controls/data/tst_tooltip.qml | |
parent | 309170a7f97759aa3f2e25a6c5202a6438a8bf4f (diff) | |
parent | 53c4bc2d1004fe963759b4009508bbc3e3fbca3e (diff) |
Merge remote-tracking branch 'origin/5.9' into 5.10
Change-Id: I9188f94e40e2ecb4da1963ce2fcf915ab7a4b4fb
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) + } + } } |