> Hi -
>
> I'm trying to connect a signal in my class to a signal, but bind one of
> its parameters to the signalling object:
>
> For instance, I want to do something like
>
> self.connect( button, qt.SIGNAL('clicked()'),
>                lambda button=button: sys.stdout.write(button) )
>
> or
>
> self.connect( button, qt.SIGNAL('clicked()'),
>                lambda button=button, self=self: self.slotTest(button) )
>
> None of the options I've tried seem to work. Is this possible??

The problem is that connect() does not take a reference to the slot
object, and the lambda function is garbage collected as soon as connect()
returns.

Phil

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

Reply via email to