#ifndef MYPROXYMODEL_H #define MYPROXYMODEL_H #include #include "treemodel.h" #include class MyProxyModel : public QSortFilterProxyModel { Q_OBJECT public: MyProxyModel(); virtual bool filterAcceptsColumn(int SourceColumn, const QModelIndex& SourceParent) const override; Q_INVOKABLE void hideColumn(){ bHide = true; this->invalidateColumnsFilter(); } bool bHide = false; TreeModel* TestModel = nullptr; }; #endif // MYPROXYMODEL_H