[Tutor] Re: Question on PyQt Signals and Slots
Lee Harr
missive at hotmail.com
Fri Feb 20 11:44:16 EST 2004
Ok. This way works ...
import sys
from qt import *
from qttable import *
numRows = 5
numCols = 5
class ATable(QTable):
def tableclick(self, *args, **kw):
print 'click', args, kw
def tc2(*args, **kw):
print 'click2', args, kw
if __name__ == '__main__':
app = QApplication(sys.argv)
table = ATable(numRows, numCols)
QObject.connect(table, SIGNAL("clicked(int, int, int, const QPoint &)"),
tc2)
QObject.connect(table, SIGNAL("clicked(int, int, int, const QPoint &)"),
table.tableclick)
#QObject.connect(table, SIGNAL("valueChanged(int,int)"),
table.tableclick)
table.show()
app.setMainWidget(table)
app.exec_loop()
_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
http://join.msn.com/?page=features/virus
More information about the Tutor
mailing list