You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am looking for a way to do ItemSelectionModel with SortFilterProxyModel.
As the QML ItemSelectionModel does not have a selectAll (can only select single Indices)
I pass the ItemSelectionModel to c++ c++item_selection_model->select(QItemSelection(startRowIndex, endRowIndex), QItemSelectionModel::Select);
So far so good all the indices that should be selected will be selected and //QML item_selection_model.rowIntersectsSelection(index, 0)
does the correct thing but once you filter or sort something the order is messed up
(rowIntersectsSelection will report indices that should not be selected and not report indices that should be selected).
@oKcerG what are your thoughts on how to handle such case in oKcerG/SortFilterProxyModel?
There is the option to just clear everything on filter or sort changes.
Select items non-contiguously would be incredibly slow.
The text was updated successfully, but these errors were encountered:
It also works with : highlighted: selectionModel.selectedIndexes, selectionModel.rowIntersectsSelection(proxyModel.mapToSource(model.index), modelIndex.parent) but that's more verbose and hacky with the binding to selectedIndexes to force the reevaluation
Hi!
I am looking for a way to do ItemSelectionModel with SortFilterProxyModel.
As the QML ItemSelectionModel does not have a selectAll (can only select single Indices)
I pass the ItemSelectionModel to c++
c++item_selection_model->select(QItemSelection(startRowIndex, endRowIndex), QItemSelectionModel::Select);
So far so good all the indices that should be selected will be selected and
//QML item_selection_model.rowIntersectsSelection(index, 0)
does the correct thing but once you filter or sort something the order is messed up
(rowIntersectsSelection will report indices that should not be selected and not report indices that should be selected).
@oKcerG what are your thoughts on how to handle such case in oKcerG/SortFilterProxyModel?
The text was updated successfully, but these errors were encountered: