View Full Version : QGraphicsItem::hoverEnterEvent problem

15th February 2007, 14:56

i'm developing a level editor for a "game". And I have a QGraphicsScene with QGraphicsPolygonItem inherit's classes. But I can't get the hoverEnterEvent to work.

Anyone can help me?

Angelo Moriconi
15th February 2007, 16:36
Have you call


on the QGraphicsPolygonItem ?

16th February 2007, 08:27
Yes, I did

I have found the problem:

I had insert the squares into a QGraphicsItemGroup and this makes that the squares can't use their events... Strange

Thanks anyway

24th February 2007, 16:21
QGraphicsItemGroup has the handlesChildEvents (http://doc.trolltech.com/4.2/qgraphicsitem.html#handlesChildEvents) property enabled; it eats all events delivered to any of its descendents. You use QGraphicsItemGroup if you need to treat a group of items as one.