views:

18

answers:

0

I want to detect when the mouse cursor moves in over a QGraphicsItem while a mouse button is pressed, i.e. the button is pressed before the mouse enters the item. My first idea was to use hoverEnterEvent, but it doesn't seem to trigger when the left mouse button is pressed. My other idea was to use dragEnterEvent, but it doesn't seem to trigger at all (even though I have used setAcceptDrops(True).

What is the best way to detect when the cursor moves on top of an item and the mouse button is pressed?