[PySide] PySide is Dead?

John Ehresman jpe at wingware.com
Mon Dec 10 21:16:56 CET 2012

On 12/10/12 2:47 PM, John Ehresman wrote:
> QObjectCleanupHandler could potentially be very useful, though I or
> someone else would need to look at how it works.

Just to follow up on this -- QObjectCleanupHandler connects to the
destroyed signal in order to get notification of object deletion.
PySide already has code to do this, but it's disabled.  I think the
problem is one of ordering: there's no guarantee that that the destroyed
signal handler that invalidates a wrapper won't be followed by another
destroyed signal handler that calls back into python code that needs to
access the object.

My proposed solution gets around this by using a property which isn't
cleared until all of the destroyed handlers are invoked.  It's a bit of
a hack to do it this way, but I think it's better than the alternatives.
 I thought I saw something that Qt 5 may provide better support for
bindings, but we need to use Qt 4 for now.



More information about the PySide mailing list