[PyQt] Signals and "RuntimeError: wrapped C/C++ object of type XXX has been deleted"

Jeremy Sanders jeremy at jeremysanders.net
Thu Nov 21 08:41:52 GMT 2013


On 20/11/13 23:16, Phil Thompson wrote:

> I can see where there might be a problem, but only if the connect() is
> called after the widget has been deleted.

Thanks for looking, Phil. I don't think that is the case here, as the 
signal is connected to the widget's slot in the widget's __init__ 
method, after calling the parent class __init__. There are other users 
of the signal, however, but these objects don't give the exception.

It seems to be more frequently reported with newer PyQt/SIP releases. 
I'd suspect it is race condition, as it appears randomly, except in the 
reproducible case I have found.

Thanks

Jeremy



More information about the PyQt mailing list