PDA

View Full Version : QTreeview projects view



bunjee
27th January 2009, 16:34
Hey there,

I'm using a QTreeview + QDirModel.

I want to achieve the following :
- A list of projects.
- Inside each project I want a QDirModel view of its directory content.

Basically I want to recode a project's file treeview like any IDE like Qt Creator or Visual studio.

What's the simplest way ?

Thanks.

bunjee
27th January 2009, 23:10
Guess I'll have to reimplement my own QAbstractListModel.

wysota
28th January 2009, 02:02
QAbstractListModel will give you a flat model and you probably want a hierarchical one so QAbstractItemModel is the way to go. Just think first if you can make use of QStandardItemModel instead of implementing your own model, I think it will suit you fine.