Thanks.<br><br>OK. I understand that.<br><br>And what if the decorator @QtCore.pyqtSignature were modified to accept more than one argument, so that you could do something like the following?<br><br>@QtCore.pyqtSignature("on_pushButton1_clicked()", "on_pushButton2_clicked()")<br>
def on_pushButton_clicked(self):<br> print "Hi Man!"<br><br>Perhaps this is something that can be achieved.<br><br>What do you think?<br><br><br><div><span class="gmail_quote">2008/3/15, Andreas Pakulat <<a href="mailto:apaku@gmx.de">apaku@gmx.de</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 15.03.08 09:31:14, Rocco Orlando Rossi wrote:<br> > Hi all.<br> ><br> > I'm new to PyQt. I'm coming from pygtk and Glade, but I am really very<br> > interested in trying out PyQt, Eric, and Designer as a more valid<br>
> alternative.<br> ><br> > Now, very briefly, here's my problem. I was attempting to autoconnect two<br> > different signals to the same method function, but I quickly realized that<br> > it isn't at all obvious how to go about doing something like that. I thought<br>
> the decorator pyqtSignature might do the trick, but unfortunately chaining<br> > those decorators did not work.<br> ><br> > Any ideas?<br> <br> <br>The simple answer is: You can't. That is you can't do this via the<br>
auto-connect feature. That features uses the method name to find out the<br> actual signal to use, so on_pushButton_clicked is a slot thats only<br> called when the clicked signal of "pushButton" is emitted.<br>
<br> You have to write the two connect statements in your __init__.<br> <br> Andreas<br> <br><br> --<br> Your boss climbed the corporate ladder, wrong by wrong.<br> _______________________________________________<br> PyQt mailing list <a href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br>
<a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br> </blockquote></div><br><br clear="all"><br>-- <br>Rocco Rossi<br><br>-----------------------------------------------------------------<br>
<br>"Alcuni vedono le cose come sono e dicono perché? Io sogno cose non ancora esistite e chiedo perché no?"<br><br>G.B. Shaw