[PyQt] lambda slot problem

Linos info at linos.es
Fri Apr 3 00:16:42 BST 2009

	i suppose i am making any mistake here but i dont know why, for example:

for checkbox, msg in ((self.printedCheckBox, "printed"), (self.finishedCheckBox, 
	self.connect(checkbox, SIGNAL("clicked(bool)"), lambda activated: 
self.changeStatus(msg, activated))

This one ever passes the last msg, "finished", although the checkbox 
self.printedCheckBox is checked.

self.connect(checkbox, SIGNAL("clicked(bool)"), 
functools.partial(self.changeStatus, msg)   works ok, why the lambda it is only 
using the last msg string ever?

Miguel Angel.

More information about the PyQt mailing list