Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.10.0 Alpha
-
None
Description
This is because QQuickItem::isUnderMouse uses QGuiApplicationPrivate::lastCursorPosition that is set in QGuiApplicationPrivate::processMouseEvent but qmltest sends the events directly to the items totally bypassing the event processing (unlike qtest) so QGuiApplicationPrivate::lastCursorPosition is never updated.
I tried making qmltest using qtest in https://codereview.qt-project.org/#/c/204413/ but there are too many existing tests (specially in qtquickcontrols2) that rely on the old behaviour to make this change feasible in the little time i have to work on Qt.
I'm attaching a test you can use to prove that QQuickItem::isUnderMouse works once this is fixed.