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

Phil Thompson phil at riverbankcomputing.com
Wed Nov 20 22:16:44 GMT 2013


On Wed, 20 Nov 2013 21:03:10 +0100, Jeremy Sanders
<jeremy at jeremysanders.net> wrote:
> On 20/11/13 20:27, Jeremy Sanders wrote:
> 
>> Thanks Phil. I can reliably reproduce this with my plotting package,
but
>> this is 60,000 lines of code. Unfortunately I haven't found a way to
>> reproduce this in an simple program. It's probably due to the complex
>> set of signals, slots and mutual references.
>>
>> I'll see whether I can swap this signal to a new style one and see
>> whether the problem can still be reproduced.
> 
> Ok. I moved the signal to a new style signal. This didn't fix the 
> problem. However, decorating the slot with the pyqtSlot decorator did 
> fix the problem. If there's any debugging information I can provide, 
> please ask.

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

Phil


More information about the PyQt mailing list