you better have a abstract class (may be CShapeitem) which is derived QGraphicsItem and put all the common code which are part of its descendant. from there u can derive ur respective classes and in main ui, it will be very convenient you to access objects of derived class using CShapeItem.
Bookmarks