hello, I'm wrapping a *QWidget *inside a *QGraphicsItem*, which is in turn used in a *QGraphicsView/Scene *(all using *PySide2*) To do so, I'm using a *QGraphicsProxyWidget *(first time I'm using it), like below : *proxy = QGraphicsProxyWidget(self) # I'm inside my QGraphicsItem, so self == QGraphicsItem* *proxy.setWidget(myWidget)*
It works, but after 4 reloads/instanciating my view, it crashes my application (in that case, Maya). *import graphic_view;reload(graphic_view)* *v = graphic_view.graphic_view()* *v.close()* *# ---- x1 is ok ------* *# ---- x2 is ok ------* *# ---- x3 is ok ------* *# ---- x4 ==> crashing ------* I noticed that if I use another variable to store my new instance (x instead of v, they y, z, w, ....) it doesn't crash So I guess it has to do with how the memory is released (or not released where it should ! Maybe some parts are, some other not, which would mess with the garbage collection mechanism ?). If anyone has a better understanding of proxy widgets and what I am doing wrong, that'd be really appreciated. And more generally speaking, I always feel a bit powerless when I face situations like this : I usually uncomment pieces of code until I isolate the issue, when I get crashes, but that seems really like a cheap debugging workflow. But no way to attach debugger or anything like that, since the crash will simply close the application. How do you guys deal with this kind of problem ? Thank you ! -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/318b7121-df53-4743-9355-a1946d6e3da5%40googlegroups.com.