[PyQt] Autoconnecting two signals to the same method.
Rocco Orlando Rossi
rocco.rossi at gmail.com
Sat Mar 15 10:54:11 GMT 2008
Yes. That would really be nice.
If you think it's possible to make it work, I'll give it a try myself,
although my own experience with decorators is at the moment rather limited
:) But I'm doing some study in that respect.
It would definitely be cool if this functionality were implemented, because
I have the feeling it's not the kind of rare need that comes up only once in
a while.
2008/3/15, Phil Thompson <phil at riverbankcomputing.com>:
>
> On Saturday 15 March 2008, Rocco Orlando Rossi wrote:
> > Thanks.
> >
> > OK. I understand that.
> >
> > And what if the decorator @QtCore.pyqtSignature were modified to accept
> > more than one argument, so that you could do something like the
> following?
> >
> > @QtCore.pyqtSignature("on_pushButton1_clicked()",
> > "on_pushButton2_clicked()")
> > def on_pushButton_clicked(self):
> > print "Hi Man!"
> >
> > Perhaps this is something that can be achieved.
> >
> > What do you think?
>
>
> That may break other uses of pyqtSignature(). However I don't see why the
> following shouldn't be made to work...
>
> @QtCore.pyqtSignature("on_pushButton1_clicked()")
> @QtCore.pyqtSignature("on_pushButton2_clicked()")
>
> def on_pushButton_clicked(self):
> print "Hi Man!"
>
>
> Phil
>
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
--
Rocco Rossi
-----------------------------------------------------------------
"Alcuni vedono le cose come sono e dicono perché? Io sogno cose non ancora
esistite e chiedo perché no?"
G.B. Shaw
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20080315/1f58db4c/attachment.html
More information about the PyQt
mailing list