Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Copy items in QGraphicsScene
Harb last edited by
In my application I want to make a kind of canvas, where user could add, delete, copy etc. different elements. The problem is that I don't know how to implement copy of elements. I didn't find special interface in either QGraphicsScene class and QGraphicsItem class, moreover QGraphicsItem is an "uncopyable" class, course both copy constructor and assign operator are defined as private. So the only alternative that I see now is to write "copy" methods for each of my subclass, where I just create new element, and set its properties through public setters. Which doesn't seem for me like a good idea.