Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.15.2, 6.0.0, 6.5.2
-
cd7c5f94a (dev), 4271d4586 (6.6), 66610bcb5 (tqtc/lts-6.5)
Description
It came up when I tried to use it in View3D to change the cursor when picking succeeds:
View3D { id: view ... property var pickedModel: null HoverHandler { onPointChanged: { var result = view.pick(point.position.x, point.position.y); view.pickedModel = result.objectHit; console.log("pick dist", result.distance, "hit", result.objectHit, "scene pos", result.scenePosition, "uv", result.uvPosition, "->", view.pickedModel, cursorShape); } cursorShape: view.pickedModel == null ? Qt.SizeAllCursor : Qt.OpenHandCursor }
but the scene fills the window and the mouse rarely leaves it (only when entering some other item on top). I used HoverHandler mainly for smaller items so far, so it was OK to have the cursor change only when entering or leaving the parent item.
In QQuickWindowPrivate::updateCursor(), commenting out the "if" seems to fix it:
// if (cursorItem != cursorItemAndHandler.first || cursorHandler != cursorItemAndHandler.second) {
But maybe QQuickWindowPrivate::flushFrameSynchronousEvents() should directly look at items under each cursor's position, both to update hover state and to check the cursor shape to use. It might be nice to get away from sending events for that.
Attachments
Issue Links
- relates to
-
QTBUG-53987 Cursor is not updated on mouse wheel over flickable
- Closed