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
For Gerrit Dashboard: QTBUG-90457 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
330740,1 | WIP dyntexture example: change cursor when hovered object can be manipulated | dev | qt/qtquick3d | Status: NEW | -2 | 0 |
516817,2 | Mark cursor as dirty and force update after shape change | dev | qt/qtdeclarative | Status: ABANDONED | 0 | 0 |
517540,6 | Update cursor if frame-synchronous hover update discovers hover change | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
519590,2 | Update cursor if frame-synchronous hover update discovers hover change | 6.6 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
519596,2 | Update cursor if frame-synchronous hover update discovers hover change | tqtc/lts-6.5 | qt/tqtc-qtdeclarative | Status: MERGED | +2 | 0 |