[PyKDE] Help -- QObject.connect() fails -- WId not recognized.

Jim Bublitz jbublitz at nwinternet.com
Wed Aug 25 01:20:48 BST 2004

On Monday 23 August 2004 12:22, Maurizio Colucci wrote:

> Thank you Jim. I am somewhat desperate here, so please post me if you have
> ANY solution.

> As a hack, I am currently trying to write a C++ function that calls
> connect(), but I don't know if I'll be successful (I have to pass the
> address of the python slot to the C++ function, and I still don't know
> how).
> Can I hope to make it work this way, or am I wasting my time?

> BTW, I am using sip 4 from debian sid.

OK - here's probably the best I can come up with. Assuming you are building 
PyKDE using sip *4* with either *no* switches to configure.py, or at least no 
-i switch (meaning all of the cpp files are concatenated into one large 
file), do the following:

in PyKDE-3.11.2/kdecore/ sipkdecorepart0.h:

change one occurrence of *proxySlot(unsigned long) to *proxySlot(WId)

in PyKDE-3.11.2/kdecore/sipkdecorepart0.cpp:

change one occurrence of *proxySlot(unsigned long) to *proxySlot(WId)
change one occurrence of *proxySlot(unsigned long a0) to *proxySlot(WId a0)

I can test this to the point where the 'connect' call will work, but I don't 
have any code to actually test the signal/slot connection. If you can do the 
above changes and let me know how they work, I can modify PyKDE to do the 
edits automatically. It's kind of a pain to do that first, since it should 
work for both sip3 and sip 4 and for concatenated and unconcatenated builds, 
which means the scripting is a more involved and retesting for all cases will 
be needed.

This change wouldn't affect anything else in PyKDE, since there is no other 
signal that has only "unsigned long" as a signature.

Let me know if this works.


More information about the PyQt mailing list