I have a custom model (QAbstractListModel) and a custom proxy model (QSortFilterProxyModel) working as a filter.
In the view, when I update the model, I need to execute "emit dataChanged(...)" in order to see this changes displayed.
But then, proxy model is automatically updated (filterAcceptsRow is called) and the view applies the corresponding filtering options.
I need to disable this behavior, to be able to update the view and only apply filtering when clicking a button, and not automatically.
For example:
- My Model has two fields,
id (int)andselected (bool) - In the view, I filter for only those elements that are selected (selected == true)
- With this filter applied, I unselect one element.
With current behavior, this element disappears, since filter is applied when model changes. I want to display item with this change and apply filtering only when a button is clicked.