PDA

View Full Version : Selection in QML TreeView using QItemSelectionModel



volcano
28th April 2016, 12:09
Hi All,

I am using QML TreeView of Qt 5.6 with QAbstractItemModel to populate the data.
I need to update the selection manually from Qt side, so I am using QItemSelectionModel which takes QAbstractItemModel as it's parent.

I'm selecting the item using select method of the QItemSelectionModel.

However, the shift selection of the model fails.

Kindly advice

volcano
2nd May 2016, 04:58
I'm looking for selecting items using the "Shift" key, but as i have selected using the QItemselectionmodel, the signal of selectionChanged isn't fired.



treeSelection_->select(Index, QItemSelectionModel::Select);


Kindly advice what i'm missing