dimanche 5 août 2018

What is the right way to dynamically create objects in qt cpp?

In GraphicsView(QGRAPHICSVIEW) setted Graphic Scene(QGRAPHICSCENE) in that i have to create objects dynamically.
Example: user drops rectangle means i have to create object from rectangle class, like this squre,line,ellipse etc...
In future may add other objects like polygon etc...
How to achieve these?
Interface classes with application.
In future when we add other object classes, need not to re-build whole application.

Aucun commentaire:

Enregistrer un commentaire