pykde  

Re: [PyKDE] Signal + Slots Problem

Sundance
Wed, 05 Mar 2003 10:10:08 -0800

I heard Stuart Bronk said:

> I have a Widget and a class called Figure I am attempting to connect
> the method Figure.loadQ with the Widgets loadQ method but I cannot
> seem to get it to work
...
>       self.connect(self.Figure, SIGNAL("loadQ()"), self.loadQ())

Okay, two things.

To start with, if Figure is a Python object, then you need to replace
  SIGNAL("loadQ()")
with
  PYSIGNAL("loadQ()")

Also, you're connecting that signal to a *method*, and not to the 
*return value* of that method. Which means you'll need to replace the 
last parameter,
  self.loadQ()
with
  self.loadQ

In short:
  self.connect(self.Figure, PYSIGNAL("loadQ()"), self.loadQ)

HTH. :)

-- S.

_______________________________________________
PyKDE mailing list    [EMAIL PROTECTED]
http://mats.gmd.de/mailman/listinfo/pykde