[PyQt] hierarchical model for QTreeView
Doug Luce
doug at pyqt.con.com
Fri Jan 4 00:18:45 GMT 2008
Outside of QDirModel, I'd like to confirm (or, even better, be told I'm
wrong) that the only way to use a hierarchical tree model under QTreeView
is by making a custom one as a class.
That is to say, there's not some existing Qt class that allows one to
build a directory-like model for QTreeView directly.
In my application, a QTreeView is to be populated with a list of client
names; once a name is clicked on, a sub-level is to be populated with a
list of attributes and displayed. This is different from a QDirModel,
which is built specifically for file system hierarchy, and populated all
at once.
Thanks,
Doug
More information about the PyQt
mailing list