[PyKDE] Sending an argument to a function with a button click

Peter Clark peter-clark at bethel.edu
Mon Aug 4 23:33:00 BST 2003


	I've started dabbling with PyQt, but I'm a little confused as to how I can 
pass an argument to a function with a button click. For instance, the 
following doesn't work:
(snip button code)

self.connect(self.button1, SIGNAL("clicked()"), self.printMessage("Testing"))

def printMessage(text):
  print text

(etc.)

	Any hints?
	:Peter




More information about the PyQt mailing list