Hi,

I would like to deselect what I have currently selected on a QTableWidget. My code goes through and removes some rows from the table. If all rows are removed while a row is selected it crashes. If nothing is selected when everything is removed it doesn't crash.

I have tried the following with no luck:
Qt Code:
  1. table->setCurrentCell(-1,-1);
  2. table->clearSelection();
To copy to clipboard, switch view to plain text mode 

Thanks
Brendan