Really simple question, but I can’t seem to see the answer in the docs.
I have a working QTableWidget and I have a need to clear the selection. The use case is when adding a row to the datamodel I don’t want the user to associate the new row with what was selected, hence the need to clear the selection.
I think you might have forgotten to check the super classes of a QTableWidget.
QTableWidget -> QTableView -> QAbstractItemView.clearSelection()
If you need to control the selection state of a specific item:
QTableWidget.setItemSelected()
Edit: previous link broken.
PySide.QtGui.QAbstractItemView.clearSelection()