Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Check if one element in a QTreeView is selected
developer_96 last edited by
i want to know the method how to check if one element in a QTreeView is selected?
And if it is, how can i get the index of that selected element.
Im using that to get always the top element of the QTreeView:
But before that i want to know if one element is selected.
And if it is, i want to get the index.
Take a look at QItemSelectionModel::selectedIndexes().