PDA

View Full Version : Change cursor only if the mouse is over an really visible QGraphicsItem



Lodorot
4th July 2009, 12:55
Hi,

I've reimplemented drawForeground() in a sub class of QGraphicsView. So part of the shown QGraphicsScene is visually overlaid (invisible).

Now I want to display a special cursor shape if the mouse cursor is over a QGraphicsItem. For this I can use setCursor(...). The Problem is that in this case the mouse cursor gets changed although the item is not visible cause its beneath the foreground drawings.

Is there a way to change the cursor only if the item is really visible.

Thank you in advance

Markus

jpn
16th July 2009, 16:58
How about using a real item for the overlay?