[PyKDE] Help -- QObject.connect() fails -- WId not recognized.
seguso.forever at tin.it
Mon Aug 23 20:22:24 BST 2004
On Monday 23 August 2004 21:08, Jim Bublitz wrote:
> 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.
Thank you Jim. I am somewhat desperate here, so please post me if you have ANY
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.
Thanks again :-)
More information about the PyQt