[PyQt] Autoconnecting two signals to the same method.

Rocco Orlando Rossi rocco.rossi at gmail.com
Sat Mar 15 11:05:43 GMT 2008


Uhmmmmm ... I've just realized that the whole pyqtSignature decorator is
implemented in C++. Therefore I'm afraid there's nothing much I can
personally do regarding this issue. I'm a C and Python programmer, but,
unfortunately absolutely no C++ :(

I do hope though that maybe someone can implement the functionality we've
been discussing,

Thank you.

2008/3/15, Rocco Orlando Rossi <rocco.rossi at gmail.com>:
>
> 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
>



-- 
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/9fb6ea73/attachment-0001.html


More information about the PyQt mailing list