<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="Courier New, Courier, monospace">After some test I have
found that if the mouse cursor is "over" an item, a call to set
the cursor of the view is ignored.<br>
<br>
So going back to Bazs ideas I added a check to re-update the view
cursor whenever an item is left.<br>
<br>
Thanks for all the help!<br>
<br>
class MyRect(QGraphicsRectItem):<br>
...<br>
def hoverLeaveEvent(self, hoverEvent):<br>
self.scene()._viewCursorReset = True<br>
<br>
class MyView(QGraphicsView):<br>
...<br>
def mouseMoveEvent(self, mouseEvent):<br>
...<br>
if self.scene()._viewCursorReset:<br>
# update cursors<br>
# only once if view is reentered<br>
self.updateItems()<br>
self.scene()._viewCursorReset = False<br>
...<br>
<br>
class MyScene(QGraphicsScene):<br>
...<br>
def __init__(self, parent=None):<br>
...<br>
self._viewCursorReset = True<br>
...<br>
</font>
</body>
</html>