tst_qtooltip: Move cursor away from tooltip.

When executing the test in a sequence (as done by make check after
tst_qstackedlayout), tst_QToolTip::task183679 often fails since
apparently the tooltip is hidden when the cursor is near it.
Move to the cursor to the right corner of the widget to fix this.

Change-Id: I3b13239e77cb387f1b1425fab79c8d6faa27b5bb
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
bb10
Friedemann Kleint 2015-06-11 12:20:00 +02:00
parent 4dc35d26f5
commit b0852eb271
1 changed files with 4 additions and 0 deletions

View File

@ -103,6 +103,10 @@ void tst_QToolTip::task183679()
Widget_task183679 widget;
widget.move(QGuiApplication::primaryScreen()->availableGeometry().topLeft() + QPoint(50, 50));
// Ensure cursor is not over tooltip, which causes it to hide
#ifndef QT_NO_CURSOR
QCursor::setPos(widget.geometry().topRight() + QPoint(-50, 50));
#endif
widget.setWindowTitle(QLatin1String(QTest::currentTestFunction())
+ QLatin1Char(' ') + QLatin1String(QTest::currentDataTag()));
widget.show();