LinkedItems is vector of pointers to QGraphicsItem, so i should in QGraphicsItem class declare friend node class. The best way is to create myItem class which inhertis QGraphicsItem, and has friends (Node, Line, etc.). Then node and line classes inherits myItem. I think that that would do the trick.
now i can create in each (new or existing) object a list of pointers to linked items. coolQt Code:
{ friend class itdLine; friend class itdNode; } class itdLine : public itdItem class itdNode: public itdItemTo copy to clipboard, switch view to plain text mode
thank you for your friendly friend suggestion![]()





Reply With Quote
Bookmarks