diff options
Diffstat (limited to 'tests/auto/quick/qquickitem/tst_qquickitem.cpp')
-rw-r--r-- | tests/auto/quick/qquickitem/tst_qquickitem.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickitem/tst_qquickitem.cpp b/tests/auto/quick/qquickitem/tst_qquickitem.cpp index 7860f5677a..3d6044ee9b 100644 --- a/tests/auto/quick/qquickitem/tst_qquickitem.cpp +++ b/tests/auto/quick/qquickitem/tst_qquickitem.cpp @@ -1600,6 +1600,10 @@ void tst_qquickitem::hoverEvent() QQuickWindow *window = new QQuickWindow(); window->resize(200, 200); window->show(); + QTest::qWaitForWindowExposed(window); +#if QT_CONFIG(cursor) // Get the cursor out of the way. + QCursor::setPos(window->geometry().topRight() + QPoint(100, 100)); +#endif HoverItem *item = new HoverItem; item->setSize(QSizeF(100, 100)); @@ -1641,6 +1645,10 @@ void tst_qquickitem::hoverEventInParent() QQuickWindow window; window.resize(200, 200); window.show(); + QTest::qWaitForWindowExposed(&window); +#if QT_CONFIG(cursor) // Get the cursor out of the way. + QCursor::setPos(window.geometry().topRight() + QPoint(100, 100)); +#endif HoverItem *parentItem = new HoverItem(window.contentItem()); parentItem->setSize(QSizeF(200, 200)); |