Hi, I need to remove some images in the QgraphicsScene, but I don't know how, cause the function remove that is originally a function of QGraphicsItem, don't appear. My code here:
QTransform transform;
int x = recorGato->col*40+220;
int y = recorGato->row*40+120;
QGraphicsPixmapItem *image2
= qgraphicsitem_cast<QGraphicsPixmapItem
*>
(scene
->itemAt
(x,y,transform
));
image2->setPos(10.0,10.0); //Need to replace move position for remove item here.
QTransform transform;
int x = recorGato->col*40+220;
int y = recorGato->row*40+120;
QGraphicsPixmapItem *image2 = qgraphicsitem_cast<QGraphicsPixmapItem*>(scene->itemAt(x,y,transform));
image2->setPos(10.0,10.0); //Need to replace move position for remove item here.
To copy to clipboard, switch view to plain text mode
Where the only thing I could do to not see this image, is move it to another position (last line of the code I showed).
Thanks for your time.
Bookmarks