From 280c75090cb518f0f1a4e2b470a7722f95b9c9ab Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 17 Feb 2018 19:29:41 +0100 Subject: Make filtering useful Add a custom QSortFilterProxyModel which filterAcceptsRow() returns true if the uppermost parent matches the filter RegExp. --- collectionwidget.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'collectionwidget.h') diff --git a/collectionwidget.h b/collectionwidget.h index e2aaa02..33799eb 100644 --- a/collectionwidget.h +++ b/collectionwidget.h @@ -16,7 +16,6 @@ class CollectionWidget : public QWidget { explicit CollectionWidget(QWidget *parent = nullptr); QTreeView *view() { return mView; } QStandardItemModel *model() { return mModel; } - QSortFilterProxyModel *proxy() { return mProxy; } void setHeaders(const QStringList headers) { mHeaders = headers; } const QStringList headers() const { return mHeaders; } void disableSorting() { mView->setSortingEnabled(false); } @@ -30,7 +29,6 @@ class CollectionWidget : public QWidget { private: QTreeView *mView; QStandardItemModel *mModel; - QSortFilterProxyModel *mProxy; QLineEdit *mFilter; QStringList mHeaders; -- cgit v1.2.3-70-g09d2