Leaving cell and is realated signal
-
Dear all,
I have QTableWidget, I fill up each cell and when i leave each cell, i need to run a slot, i need to same
cellLeaved(int,int) signal
but for leaving cell or finishing edit such as editFinished() i didn't find anything.I need help... i code pyqt.
-
You might need to use the currentCellChanged() signal. Then call the slot of the previous cell.
-
I used currentCellChanged (int,int,int,int) get the error and then used currentItemChanged (QTableWidgetItem *,QTableWidgetItem *) signal , My error is :
////////////////////////////////////////////
Traceback (most recent call last):
File "/home/mohsen/codes/amlak/amlak/src/materialsInsertFrame.py", line 254, in <lambda>
lambda: self.materialsInstance.setFilterDict_Insert("TW",self,"imported_party_values",0,self.tableWidget.currentItem().row(),self.tableWidget.currentItem().column()))
AttributeError: 'NoneType' object has no attribute 'row'
///////////////////////////////////////////My code is :
////////////////////////////////////////////////////
QtCore.QObject.connect(self.tableWidget, QtCore.SIGNAL(_fromUtf8("currentCellChanged (int,int,int,int)")),
lambda: self.materialsInstance.setFilterDict_Insert("TW",self,"imported_party_attributes",0,self.tableWidget.currentItem().row(),self.tableWidget.currentItem().column()))
//////////////////////////////////////////////////////// -
I solved i changed my code to :
///////////////////
QtCore.QObject.connect(self.tableWidget, QtCore.SIGNAL(_fromUtf8("currentCellChanged (int,int,int,int)")),
lambda: self.materialsInstance.setFilterDict_Insert("TW",self,"imported_party_values",0,self.tableWidget.currentRow(),self.tableWidget.currentColumn()))
///////////////////////////////