I have QTableWidget::selectionMode
- SingleSelection
, QTableWidget::selectionBehavior
- SelectRows
. So user selects rows via single click. However, when clicking the same row again, it isn't deselected. How to implement such deselection?
Asked
Active
Viewed 1,433 times
2

Rob Luca
- 153
- 10
-
Does multiple selection is allowed by your application logic? – Gluttton Jul 24 '16 at 12:05
-
@Gluttton: currently not, it's in TODO for future release – Rob Luca Jul 24 '16 at 12:31
-
2Does deselect using `click + Ctrl` is acceptable for you? – Gluttton Jul 24 '16 at 12:41
-
@Gluttton: thanks for the information, it's nice that this can be already performed somehow, but simple deselection on second click would be better – Rob Luca Jul 24 '16 at 12:50
-
`but simple deselection on second click would be better`, you need write some code to achieve it. You need handle mouse click on view and manually change selection. – Gluttton Jul 24 '16 at 12:56
-
You can try search `qtableview set maximum selected rows` - this is different issue, but similar approach. – Gluttton Jul 24 '16 at 12:59