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

Jim Bublitz jbublitz at nwinternet.com
Mon Aug 23 20:08:36 BST 2004


On Monday 23 August 2004 10:03, Maurizio Colucci wrote:
> On Monday 23 August 2004 17:41, Maurizio Colucci wrote:

> > I don't understand this error:

> >     kwinmod= KWinModule()
> >     def onActiveWindowChanged(wid):
> >         print "onActiveWindowChanged" + str(wid)
> >     QObject.connect(kwinmod, SIGNAL("activeWindowChanged(WId)"),
> >                   onActiveWindowChanged)

> > The output is:

> >  File "/dat/pub/src/by-mau/logicaldesktop/LogicalDesktop/main.py", line
> > 1357, in run QObject.connect(kwinmod, SIGNAL("activeWindowChanged(WId)"),
> > onActiveWindowChanged) RuntimeError: Signal has wrong argument types for
> > slot

> I saw the post

>   http://www.mail-archive.com/pykde%40mats.imk.fraunhofer.de/msg01444.html

> and it seems it is a known sip problem.

> Wasn't it fixed for sip 4?

> If it wasn't, I absolutely need a quick hack...

I played around with this for a while, and I can't seem to find anyway to get 
this signal to work with any combination of #defines (%ModuleHeader and 
%TypeHeader) or changing WId to unsigned long in the sip file. It seems like 
that should be possible (esp given the msg you referenced), so I may be 
screwing up something else.

I'll give another look later today.

Was anything changed in sip?

Jim




More information about the PyQt mailing list