PDA

View Full Version : QGraphicsItem can't receive mouse leave/enter event



wshn13
22nd June 2011, 04:45
Now , I put a QGraphicsPixmapItem into a QGraphicsScene , When mouse enter the item ,I want the item highlighted , but now I can,t receive the mouseEnter event, so is mouseLeave???

Rachol
22nd June 2011, 08:32
You can receive hoverEnterEvent(), hoverMoveEvent(), and hoverLeaveEvent(), but remember to execute setAcceptHoverEvents ( true ) on your item.