Does a easy-access "toggle" function exist for selecting items?
-
I have a QTableWidget, and I have the code
ui->tableWidget_Configs->selectRow(i);to select it. I am wondering whether an easy-access "toggle" function exists for selecting and unselecting items, or some workaround is needed to toggle or deselect items. -
Call
ui->tableWidget_Configs->selectionModel()to get a selection model of the table. You can then call its select() method that lets you change selection using variety of modes, including toggle: SelectionFlags.