Hi all
I am having a problem with my QGraphicView framework. I want to select an QGraphcsPathItem by clicking on an an area surrounding the item. This area is +5 pixels on all sides on the item's bounding rect. I did the following:
The mouse click on the area surrounding the boundingRect is received by the item. I checked this by subclassing the mousePressEvent(). But the item is not getting selected this way. The item is a pathItem. So would it only get selected if clicked on the path?QRectF boundingRect() const
{ return QGraphicsItem::boundingRect().adjusted(-5, -5, +5, +5); }
bool contains(const QPointF &point) const
{ return boundingRect().contains(point); }
Thanks
Arjun
Bookmarks