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
parent
4f1234033b
commit
874aaa6ea0
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue