[Qt-interest] QGraphicsItem Hover Events

Vyacheslav v.matyushin at gmail.com
Mon Dec 14 01:17:17 CET 2009


Hi.
I've subclassed QGraphicsScene and QGraphicsPixmapItem.
In my scene i've reimplemented mouse press, release and move event handlers.
They do some work and then call their QGraphicsScene:: versions.
In my QGraphicsPixmapItem I've reimplemented void hoverMoveEvent 
(QGraphicsSceneHoverEvent *event)
which changes the look of the item and sends a signal with some 
information to the scene when the mouse is at the item.
It works when no mouse button is pressed.
I click left mouse button and start moving the mouse.
But when the left mouse button is pressed, the hover event is not 
received, because the mouse grabber item exists.
Also reimplementing of mouse move event in my subclassed 
QGraphicsPixmapItem gives no effect
because another Item on the scene is already the mouse grabber.

What I wan't is to click the left mouse button at some item, then move 
the mouse
and be able to receive hover move (or any other mouse move) event from 
other items
when the mouse is at that items on the scene.
Can I do that?



More information about the Qt-interest-old mailing list