2

How can I catch QTreeView deselected event?Is there in QT this type event? Thanks

T. Bergemann
  • 51
  • 1
  • 5
Noro
  • 1,643
  • 5
  • 22
  • 38

1 Answers1

6

QAbstractItemView::selectionModel() will return a pointer to the selection model of the view. That model fires a signal whenever the selection is changed, whether it's selected or deselected.

Connect the QItemSelectionModel::selectionChanged(const QItemSelection & selected, const QItemSelection & deselected) signal to a slot in your code, and deal with the deselected parameter.

Fred
  • 4,894
  • 1
  • 31
  • 48