Deleting an Item in QGraphicsScene C++
The question is this-initialized QGraphicsEllipseItem *ellipse and marked it with QGraphicsScene, how would it be correct to remove this ellipse from the scene?
1
1 answers
If you delete it completely, you can just delete
' om (Qt will take care of all the descendants and the notification of the scene), and if only from the scene (and then use it for some other reason), then QGraphicsScene::removeItem()
.
1
Author: Fat-Zer, 2018-03-26 16:45:03