I have a pyqt5 app with an MVC structure similar to the one described here. When the model is edited, a pyqtSignal is emitted, after which the controller will update the view (and, of course, the other way around). To enable the use of pyqtSignals, the model class inherits from the QtCore.QObject class.
I now want to duplicate the current "window" - creating a copy of the model, and coupling it to a newly created view and controller. However, the fact that the model inherits from QtCore.QObject makes it so I cannot copy it (TypeError: cannot pickle 'Model' object
- QObjects cannot be copied by design).
What would be the best way to approach this problem?