I have a class which contains a QGraphicsScene
. In some function I wish to "clear" this scene from all items (& then fill it up with new items).
I tried the following code, but that gave me an access violation:
NewScene->clear();
NewScene is defined as following:
private:
std::unique_ptr<QGraphicsScene> NewScene;
What goes wrong, and how can I clear this scene?