[Qt-interest] QSortFilterProxyModel - the parent item does not match i want to go down to the child as well and filter

Sajjad dosto.walla at gmail.com
Mon Nov 15 02:38:18 CET 2010


Hello forum,

I have loaded a database in the tree-hierarchy with the QTreeView and i want
to highlight a particular tree item by the regular expression entered by
 the user in
the line edit.

I am using the QSortFilterProxyModel to get this done. According to  the
manual ,

For hierarchical models, the filter is applied recursively to all children.
*If a parent item doesn't match the filter, none of its children will be
shown.*

I want to over-ride the feature in the bold text and i want to apply filter
both to the parent and child . But the parent item does not match i want to
go down to the

child as well.

I think i have to subclass the QSortFilterProxyModel. Am in the right track?


Regards
Sajjad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101115/5abf4db9/attachment.html 


More information about the Qt-interest-old mailing list