[PyKDE] Emitting signals

Jim Bublitz jbublitz at nwinternet.com
Thu Jun 29 20:31:53 BST 2000

I can't get the following code to work
with PyQT/PyKDE 0.11.1:

class class1 (QWidget):

     self.emit (PYSIGNAL ("someSignal"), (param))


class class2 (QWidget):


     self.class1Instance = class1 (self)


     self.connect (self.class1Instance, PYSIGNAL ("someSignal"),


  def handleSignal (self, param):

I'm getting a "TypeError: Invalid argument types to QObject.emit ()"
at run time on the "emit" line in class1.

If I change to:

self.emit (PYSIGNAL ("someSignal"), (param, 6))  {1]


def handleSignal (self, param, dummy)

it works fine.

What's up??


[1] I think other numbers besides 6 would work too :)
 -- just adding a second dummy parameter. All instances
where I used two params or no params worked fine. Just 
single param instances failed.

More information about the PyQt mailing list