jeudi 7 juillet 2016

How to disable filtering option for a QTreeView or Model


I am having a piece of code which deals with two QTreeView, where the items are added from left tree view to the right tree view. Here is a part of code: MasterModel *model = new MasterModel; leftProxyFilterModel *leftModel = new leftProxyFilterModel; rightSelectedRowsFiletrModel *rightModel = new rightSelectedRowsFilterModel; QTreeView *leftTreeView; QTreeView *rightTreeView; leftModel->setSourceModel(model); rightModel->setSourceModel(leftModel); leftTreeView->setModel(leftModel); rightTreeView->setModel(rightModel); Now for filtering some strings are set like this: leftModel->setFilterWildcard(LineEdit->text()); This line is Filtering the contents of both the tree views, what I want is filtering option should be applicable only for left tree view. Can someone help me to achieve this???

Aucun commentaire:

Enregistrer un commentaire