yonutix
yonutix

Reputation: 2439

QTreeView clear selection

I want to clear the treeView selection, I use static_cast<QTreeView*>(mContext)->selectionModel()->clear();, static_cast<QTreeView*>(mContext) being the tree I'm talking about, however a secondary light blue selection remain, how can I remove the selection entirely?

Thanks!

Upvotes: 3

Views: 8178

Answers (1)

ahmed
ahmed

Reputation: 5600

To clear the selection use clearSelection

static_cast<QTreeView*>(mContext)->selectionModel()->clearSelection();

Upvotes: 8

Related Questions