I have default QTableView. I want to get following selection behaviour:
- If we selecting cells, selection will work like if we accepted
SelectionMode::ContiguousSelection
- If we selecting rows/column by clicking on QHeaderView section, selection will work like we accepted
SelectionMode::ExtendedSelection
, but deselect all cells, if any were selected.
I tried set SelectionMode to headers in QTableView constructor, but it doesn't work.
Question is how can I do it properly?