Hi all.<br><br>I'm new to PyQt. I'm coming from pygtk and Glade, but I
am really very interested in trying out PyQt, Eric, and Designer as a
more valid alternative.<br><br>Now, very briefly, here's my problem. I
was attempting to autoconnect two different signals to the same method
function, but I quickly realized that it isn't at all obvious how to go
about doing something like that. I thought the decorator pyqtSignature
might do the trick, but unfortunately chaining those decorators did not
work.<br>
<br>Any ideas?<br><br>Here's the example code I was working on:<br><br>#!/usr/bin/env python<br>import sys<br><br>from PyQt4 import QtCore, QtGui, uic<br><br>(form_class, base_class) = uic.loadUiType("qtui.ui")<br>
<br>class MyForm(form_class, base_class):<br> def __init__(self, *args):<br> base_class.__init__(self, *args)<br> self.setupUi(self)<br> <br> @QtCore.pyqtSignature("on_pushButton1_clicked()")<br>
@QtCore.pyqtSignature("on_pushButton2_clicked()")<br> def on_pushButton_clicked(self):<br> print "Hi Man!"<br><br>app = QtGui.QApplication(sys.argv)<br>form = MyForm()<br>form.show()<br>
app.exec_()<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