QSortFilterProxyModel and custom QTreeView-class - selectionChanged not working
Hi!
I have an issue that manifested after changing from using a custom QAbstractItemModel directly, to using QSortFilterProxyModel as a proxy model.
Now in my custom QTreeView class the reimplemented function "selectionChanged" is never called. This is a new behavior...
Sorting of my data works at least...
Also none of the rows in my TreeView are highlighted when I click on them.
I tried to create a new QItemSelectionModel, setting it to the TreeView and connecting it to a slot I created. But that also didn't work...
Can it be something I may have forgotten?
Re: QSortFilterProxyModel and custom QTreeView-class - selectionChanged not working
Selection should work independently of the model as long as the item flags allow selection.
Cheers,
_
Re: QSortFilterProxyModel and custom QTreeView-class - selectionChanged not working
Thanks for the reply!
It didn't seem like the issue was with my flags. But it made me try to look a little harder at my code.
I tried to rewrite some of the code and it magically worked... :p
Probably something that I missed the first time around.
Thanks! :)