I have a QTreeView using a custom QAbstractItemModel. I update the tree view selection with
treeView->selectionModel()->select(selection, QItemSelectionModel::ClearAndSelect);
Which should also emit the signal selectionChanged for the tree view to receive. My issue is the tree view doesn't refresh until I interact with it with my cursor.
I've tried calling treeView->update() but it doesn't make a difference. What am I missing?
Apologies, I've realised I was blocking the QItemSelectionModel signals further up my chain to avoid repeat calls of functions.