2

Which function can be used to select an item in a tree view (or model) with Qt? I even don't know the function is in tree view or model. How to do it? Any function like select(const QModelIndex & index)? Thanks.

user1899020
  • 13,167
  • 21
  • 79
  • 154

1 Answers1

2

QTreeView deals in QModelIndexes. You can control selections through the selectionModel on the view:
http://doc.qt.digia.com/qt/qabstractitemview.html#selectionModel

jdi
  • 90,542
  • 19
  • 167
  • 203