hello, I have this good old *internal C++ object already deleted *and can't understand where it comes from To summarize, I have a QMainWindow with a QScrollArea, and I want to parent/unparent widgets into this QScrollArea. Ofc I make sure to re-parent the widget I'm about to remove, to make sure it never gets unparented and garbage collected, but it doesn't change anything....
Since I still don't know how to format code on google groups (yay \o/), I updated some code on github <https://github.com/fruityvince/debug> if someone wants to try it , and here is a snippet to reproduce the error import main;import foo m = main.Main() # this is my main window m.show() # now I create 2 widgets, and I want to display the first one in my scrollArea, then the second, then come back on my first bar1 = foo.Bar("bar1") bar2 = foo.Bar("bar2") # now I parent it to my scrollArea m.something_triggered(bar1) m.something_triggered(bar2) # this is where bar1 gets deleted, even though i reparent it before replacing with bar2 >>> # RuntimeError: Internal C++ object (PySide2.QtWidgets.QLabel) already deleted. # Can anyone explain me why / how my bar1 gets deleted, even though I parent it to my mainWindow to prevent garbage collection? 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/b85d35a1-c803-4a76-a406-be5130acd88en%40googlegroups.com.