[PyKDE] un-connectable signals (probably sip bug)

David Boddie david at boddie.org.uk
Sun Dec 21 00:50:00 GMT 2003


On Fri, 19 Dec 2003 10:31:55, Jim Bublitz wrote:

> On Thursday December 18 2003 10:44, Stefan Bund wrote:

> > I have come across the following Problem: I cannot connect
> > python methods to several KDE signals:
> >
> >   KWinModule::windowAdded(WId) is one,
> >   KIO::Job::processedSize(KIO::Job*,KIO::filesize_t) is
> > another.

[...]

> I'm not sure exactly what will work, but the WId signals should
> work if you specify either "unsigned long", "long", or "ulong"  
> in place of WId (I'd try them in that order).

I created a KWinModule instance in the usual manner:

 from kdecore import KWinModule
 from qt import SIGNAL
 k = KWinModule()
 def fn(a): print a

The following connection attempt

 k.connect(k, SIGNAL("windowAdded(unsigned long)"), fn)

returns False, whereas

 k.connect(k, SIGNAL("windowAdded(long)"), fn)
 k.connect(k, SIGNAL("windowAdded(ulong)"), fn)

both cause RuntimeError exceptions to be raised.

This is just to provide some more information on the problem. I was
hoping that the unsigned long trick might work but, presumably, the
arguments of signals aren't resolved to the underlying data structures
involved.

David




More information about the PyQt mailing list