Qt 6.11 is out! See what's new in the release
blog
Switch selection mode
-
Hi, I have a QTableView, I'm using SelectRow, and I want single-row selection by default and multi-selection when the <ctrl> key is pressed.
What is the best practice for this?
Currently I manage that myself: I listen to the QTableView::clicked signal and check the keyboardModifiers, it seems awkword -
-
Hi, I have a QTableView, I'm using SelectRow, and I want single-row selection by default and multi-selection when the <ctrl> key is pressed.
What is the best practice for this?
Currently I manage that myself: I listen to the QTableView::clicked signal and check the keyboardModifiers, it seems awkword -
That's what ExtendedSelection does. Take a look at the SelectionBehavior enum description.