QTest::mouseEvent expects window-local coordinates.

This makes the automatic center click feature of the mouse event methods
also work if the target window isn't positioned at 0,0.

Change-Id: I0d711e484620900ba2ffc4139f7e13346a7482d3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
bb10
Volker Krause 2015-11-17 16:16:12 +01:00
parent 4f1234033b
commit 874aaa6ea0
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@ namespace QTest
}
if (pos.isNull())
pos = window->geometry().center();
pos = QPoint(window->width() / 2, window->height() / 2);
QTEST_ASSERT(uint(stateKey) == 0 || stateKey & Qt::KeyboardModifierMask);