From 9d16ae8d2ce5478f7387ec70c70be46e76c85796 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Fri, 29 Jul 2011 10:44:30 +0200 Subject: [PATCH] Fix tst_qgraphicsview::task255529_transformationAnchorMouseAndViewportMargins If we do not process the event, q->underMouse may return false in QGraphicsViewPrivate::centerView (as the QEvent::Enter has not been received yet.) It was working before if by luck, the window appears under the cursor. Change-Id: I9b4497683eae20915680297013a9c21fd6275f4b Reviewed-on: http://codereview.qt.nokia.com/2385 Reviewed-by: Qt Sanity Bot Reviewed-by: Sergio Ahumada --- tests/auto/qgraphicsview/tst_qgraphicsview.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp index e9ddf481af..cdb87b57d7 100644 --- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp @@ -104,6 +104,7 @@ static void sendMouseMove(QWidget *widget, const QPoint &point, Qt::MouseButton QTest::mouseMove(widget, point); QMouseEvent event(QEvent::MouseMove, point, button, buttons, 0); QApplication::sendEvent(widget, &event); + QApplication::processEvents(); } static void sendMouseRelease(QWidget *widget, const QPoint &point, Qt::MouseButton button = Qt::LeftButton)