I don't think you can setModel() on a QTreeWidget, but you can on a QTreeView.
There are 2 ways to use a treeview / listview etc. With the 'simple' QTreeWidget / QListWidget who have their own inner model, or through the model / view classes like for instance QTreeView / QDirModel or other models.
So just use QTreeView in stead of QTreeWidget and you're set.
Bookmarks