Re: [PySide] Internal C++ object (PySide2.QtWidgets.QListWidget) already deleted

2023-03-28 Thread Friedemann Kleint via PySide
Hi, could you maybe post a complete, minimal example? Maybe QGraphicsSceneEvent.source() needs some ownership modification in the binding. Regards, Friedemann -- Friedemann Kleint The Qt Company GmbH ___ PySide mailing list PySide@qt-project.org

Re: [PySide] Internal C++ object (PySide2.QtWidgets.QListWidget) already deleted

2023-03-27 Thread henry.wede--- via PySide
Hello, So... I don't understand why this is happening but I finally figured out what was causing the problem.  Somehow I am not using drag and drop correctly. I drag an item from a QListWidget and drop it onto a QGraphicsScene.  In the graphics scene events, I was checking that the

Re: [PySide] Internal C++ object (PySide2.QtWidgets.QListWidget) already deleted

2023-03-27 Thread henry.wede--- via PySide
Thank you for the suggestion Alexis.  I tried to connect this signal as follows but never saw a message before the error happened. along with other connectionsself.ui.listBlockTypes.destroyed.connect(self.listSource_Destroyed) another method in the application class...def

Re: [PySide] Internal C++ object (PySide2.QtWidgets.QListWidget) already deleted

2023-03-27 Thread Alexis Jeandet
Hello Henry, I usually get this error when I forget to keep an active reference on one object from Python. Then since QListWidget inherits QObject, you can connect something to its "destroyed" signal to see when it gets deleted. https://doc.qt.io/qt-6/qobject.html#destroyed Alexis. On Mon,