PDA

View Full Version : Mouse press event detection



A.H.M. Mahfuzur Rahman
14th June 2009, 13:55
I have drawn a circle from a svg file using QSvgGraphicsItem. Recently, my mousePressEvent(QGraphicsSceneMouseEvent *event) function detects mouse press within the bounding rectangle of my QSvgGraphicsItem. But, I want to get mousepress only for the circular region(when mouse is clicked on the circle), not within the bounding rectangle.

What Should I do exactly?

Mahfuz

jpn
14th June 2009, 14:08
Reimplement QGraphicsItem::shape() and return the circular region.