How can i capture the cellChanged() signal ONLY WHEN user editing
in QTableWidge,the itemChanged() or cellChanged() signal simply emits whenever a item or cell content changed, but i want save the item.text() only when user edited it ,not by setItem() method in program.coz i have write some code to add a new row into QTableWidget, after the new row added, the itemChanged() emitted row*col times, coz,the program called setItem() row*col time.
i was trying to find some signal like itemFocusOut() to ensure user side editing, but there is no signal like this ,only have itemEnter()
is there a better way to resolve this, currently when i update the table from dataSet, first disconnect itemChanged() then ,connect it again .
sry for my english
Re: How can i capture the cellChanged() signal ONLY WHEN user editing
QAbstractItemView::currentChanged() will tell you when the current cell changes as the user moves off it (although the program can trigger that also). QAbstractItemModel::dataChanged() can tell you when the data is actually changed in the model.