[Qt-interest] How to use a QSortFilterProxyModel to view more than one model in a view?
Andre Somers
andre at familiesomers.nl
Wed Oct 6 07:27:35 CEST 2010
Op 5-10-2010 21:01, norulez schreef:
> Hi,
>
> can anybody explain me on how to use a QSortFilterProxyModel to view more than one model in a view?
>
> For example, I want to display a QStandardItemModel and a QDirModel, both in a QTreeView.
>
> Much thanks in advance
QSortFilterProxyModel can't do that.
There is no standard proxy model that can merge existing models. That
would not make much sense either, as only you know how you want those
two models to merge. You know how they relate and how you can sensibly
put them in a single view, but no standard model does, and neither do we.
Perhaps you should explain what you want to achieve first, instead of
the way you think you should reach that goal.
André
More information about the Qt-interest-old
mailing list