Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
5.15.2
-
None
Description
When using QGraphicsView.setCursor() after a QGraphicsItem child has had QGraphicsItem.setCursor() called, all subsequent QGraphicsView.setCursor() calls will be ignored.
I'm sorry to say: this issue, which seems to have existed since at least 2009, is still a a problem in Qt v5.15.2. See bugs QTBUG-3732, QTBUG-17115; the older one of these has some pretty detailed info(/speculation?) about the responsible source code.
In my app, I can click-and-drag to pan the canvas, or I can click-and-drag to move an item on the canvas. Doing the former without first even hovering over an item on the canvas will activate the closed-hand cursor - but after any interaction with an item, the cursor no longer changes. It seems to be affected by QGraphicsRectItem's (yes, even the rhombus is a rect in disguise), but not QGraphicsLineItem's.
I'm attaching a screencast to demo this (oh, an oversight while recording: it doesn't seem to matter that the 'rect' is being custom-painted as a rhombus; the problem is the same for round rects and regular rects...).
(I have added this same text to 17115, but I considered it's probably more appropriate to submit a new bug for v5.x.).
Attachments
Issue Links
- duplicates
-
QTBUG-17115 setCursor on QGraphicsView don't work when add QWidget on the QGraphicsScene
- Open