[PyKDE] PyQt4: PyObject in SIGNAL

Giovanni Bajo rasky at develer.com
Fri Dec 1 13:00:31 GMT 2006

Mark Summerfield wrote:

>>>> what's the meaning of the string "PyObject" used within the signature of
>>>> a signal in PyQt4? I can't seem to find it in the PyQt4 documentation.
>>>> If I pass it a random python object I get core dumps and random crashes,
>>>> so I assume it's not really meant for that...
>>> You can do Python-Python signals which Phil calls "short-circuit
>>> signals" in PyQt [...]
>> Yes, this is in fact documented. I guess these short-circuit signals are
>> similar to the good old PYSIGNALs in PyQt3.
>> But this still does not answer my question: what does "PyObject" means in
>> the signature of a signal?
> I'd just assumed any valid identifier.

I'm asking because I got segfaults when trying to pass python objects around 
using SIGNALs and "PyObject" in the signature. Specifically, it seems that the 
objects go through a SIP wrap/unwrap cycle, because the slot function receives 
an object with a different id().

I was thinking that PyObject meant something like "any object wrapped by SIP", 
but I can't understand the exact meaning.
Giovanni Bajo

More information about the PyQt mailing list