-
Notifications
You must be signed in to change notification settings - Fork 445
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First commit of the feature: 'Filtering documents'.
- Loading branch information
sebastian.vallet
committed
Oct 19, 2024
1 parent
2375205
commit 6b0e4c5
Showing
5 changed files
with
29 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,6 @@ class UBSortFilterProxyModel : public QSortFilterProxyModel | |
UBSortFilterProxyModel(); | ||
|
||
bool lessThan(const QModelIndex &left, const QModelIndex &right) const; | ||
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const; | ||
This comment has been minimized.
Sorry, something went wrong.
letsfindaway
Collaborator
|
||
}; | ||
|
||
#endif // UBSORTFILTERPROXYMODEL_H |
Instead of implementing the comparison on your own, one typically invokes the base class implementation for this. This makes it sure that it works for all options, fixed string, wildcard and regular expression. So something like
return QSortFilterProxyModel::filterAcceptsRow(sourceRow, sourceParent);