I get the selected line with the
row = self.table.currentRow()
but when I click outside the tableWidget it keeps the last currentRow, how do I click anywhere outside the tableWidget the currentRow goes back to -1 and deselect the line
CodePudding user response:
according to the musicamante.
self.table.setCurrentIndex(QModelIndex())
it's exactly what I needed