[Qt-interest] Quick filtering the QTreeView

Sergei Stolyarov sergei.stolyarov at regolit.com
Tue Oct 27 12:49:39 CET 2009


Hello.

I have QTreeView-based class, QAbstractItemModel-based model for this
view and QSortFilterProxyModel-base proxy filter for filtering the
tree.

Original QSortFilterProxyModel's style of filtering isn't good for me.
I need more intellectual filtering: if any tree node matches the
criteria then all nodes in the path the root to that node must be
displayed. I've tried direct solution (overriding method
filterAcceptsRow()), calling filterAcceptsRow() for child nodes, but
it's extremely slow.

Is there are any example of such quick filtering using
QSortFilterProxyModel-based class?

-- 
Sergei Stolyarov



More information about the Qt-interest-old mailing list