开发者

How can I catch QTreeView deselected event?

开发者 https://www.devze.com 2023-01-24 13:26 出处:网络
How can I catch QTreeView deselected event?Is ther开发者_运维技巧e in QT this type event?ThanksQAbstractItemView::selectionModel() will return a pointer to the selection model of the view. That model

How can I catch QTreeView deselected event?Is ther开发者_运维技巧e in QT this type event? Thanks


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消