I have a table with some data that I want to be able to edit through the QTableWidget
. Upon trying to connect the currentItemChanged
signal:
self.QTableWidget.currentItemChanged(QTableWidgetItem,QTableWidgetItem).connect(self.editCell)
I get the following error:
'TypeError: native Qt signal is not callable'
I went looking in to the QtDesigner
, where you can connect signals. I made a QTableWidget
, and connected it to a label so that changing the currentItem
hid the label.
In the signal connecting dialog the currentItemChanged
signal was written thus:
currentItemChanged(QTableWidgetItem*,QTableWidgetItem*)
I don't know what the *
means, but I assume it's important.
Am I using the wrong signal or is my syntax wrong somehow? In short, I want there a signal to be emitted upon changing any particular item/cell(I'm not sure what the distinction is)
____________________EDIT_________________________
EDIT: In the QTableWidgetItem class documentation I also found that it has functions column() and row().
I tried adding them like this:
self.QTableWidget.currentItemChanged(QTableWidgetItem.column(QTableWidgetItem.column()),QTableWidgetItem.row()).connect(self.editCell)
But got the error:
TypeError: descriptor 'column' requires a 'PySide.QtGui.QTableWidgetItem' object but received a 'Shiboken.ObjectType