Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Mouse Move Event of QGraphicsView



  • I have custom GraphicsView. I override mouseMoveEvent. In QGraphicsScene i have QGraphicsRectItem which i can move. When i press not on QGraphicsRectItem and move mouseMoveEvent works, but when i press on QGraphicsRectItem mouseMoveEvent doesnt work. In constructor of GraphicsView i wrote setMouseTracking(true


  • Lifetime Qt Champion

    Hi,

    Because you are on top of an item which can have it's own handling of mouse events especially if you made it movable.


Log in to reply