QUndoStack across 2 cpps? QTreeView and QGraphicsScene
Solved
General and Desktop
-
@JonB said in QUndoStack across 2 cpps? QTreeView and QGraphicsScene:
The model code can be kept in its own/class/module/file, that is included into both the tree view & graphics scene classes, they should not need to see each other directly. This would be my inclination.
-
@StudentScripter Yes, a suitable public getter & setter for the model called from each of the
QTreeView
andQGraphicsScene
modules. -
@StudentScripter QTreeView already has a setter for the model. You just need to add one to your QGraphicsScene subclass.
-
@StudentScripter great !
Then please mark the model as solved using the "Topic Tools" button or the dotted menu beside the answer you deem correct so that other forum users may know a solution has been found :-)
-