PDA

View Full Version : QTreeView Multiline selection using Ctrl and mouse click



tvj4218
5th April 2018, 22:15
I've got a QTreView with multiple rows in it.
I'd like to select a few random rows by holding down the Ctrl key and clicking on each desired row.
By default, every single row from the current row to the last clicked on row gets highlighted.
How do I change this behavior?

Thanks.

t

Ginsengelf
9th April 2018, 09:25
Hi, this should be controlled by the Selection Mode: http://doc.qt.io/qt-5/qabstractitemview.html#SelectionMode-enum

Ginsengelf