[Qt-interest] QTreeView, proxy model and expandable state
Dmitry Baryshev
ksquirrel.iv at gmail.com
Mon Apr 13 17:26:26 CEST 2009
Hi.
I use QTreeView+QFileSystemModel. It seems to work fine, all directory
items have expanable flag ("+" on the left side). Now I've added
QSortFilterProxyModel with only one reimplemented method - "bool
SortFilterProxyModel::filterAcceptsRow(int row, const QModelIndex
&parent) const". Now all directory items in QTreeView lost its
expandable state - no '+' elements.
QTreeView::setItemsExpandable(true) doesn't help. I don't understand
the logic why filtering affects expandable states? Could you please
help me with this strange problem? Thanks!
--
More information about the Qt-interest-old
mailing list