I have tried to re-implement the QTableWidget.cellActivated(row, number) using PyQt4, to catch the coordinates of the currently active cell. The sample below does not work as expected, the method is not activated when a cell is clicked. Have I done something wrong?
class DictionaryTable(QtGui.QTableWidget):
def __init__(self, parent=None):
QtGui.QTableWidget.__init__(self, parent)
def cellActivated(self, row, column):
print row, column
Looking at the docs, i see:
This is a signal, not an event. So you don’t need to [re]implement
cellActivatedmethod (it’s not a method, it’s a class attribute of signal type). You need to connect to the signal: