QGraphicsScene ::itemAt() ,not returning the item[CLOSED]
-
@void MyScene:: mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent)
{
QGraphicsItem *item=itemAt(mouseEvent->screenPos(),QTransform());
QPointF p1=mouseEvent->scenePos();//i get a valid point
QPointF p2=item->scenePos();////i get (0,0) even when i click on a valid itemsupdate();
QGraphicsScene::mouseReleaseEvent(mouseEvent);
}
@MyScene inherits :QGraphicsScene and QObject
the items in MyScene :inherit QGraphicsItem