Stabilize test QMenu::QTBUG_89082_actionTipsHide() on Windows

Move the cursor out of the way to prevent it from interfering.
Amends 3f3d5e6716.

Task-number: QTBUG-89082
Pick-to: 5.15
Pick-to: 6.0
Change-Id: I0efbe2b5618a04e92839083a1bd3383e05d6ff93
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
bb10
Friedemann Kleint 2021-03-02 08:37:15 +01:00
parent 417895b458
commit ba13960392
1 changed files with 3 additions and 0 deletions

View File

@ -1369,6 +1369,9 @@ void tst_QMenu::QTBUG_89082_actionTipsHide()
widget.resize(300, 200);
centerOnScreen(&widget);
widget.show();
#if QT_CONFIG(cursor)
QCursor::setPos(widget.screen()->availableGeometry().topLeft() + QPoint(10, 10));
#endif
widget.activateWindow();
QVERIFY(QTest::qWaitForWindowExposed(&widget));
menu->popup(widget.geometry().topRight() + QPoint(50, 0));