PDA

View Full Version : [QT4.1.1 XP] multi-columns list model/view



incapacitant
26th February 2006, 12:31
I want to create a model/view based form to show a multi-columns list.
In QT3 I used QListView with addColumn().

In QT4 I understand from Assistant that :
- for one column list, use QListView or QListWidget
- for more columns, use QTreeView, or QTreeWidget


Are both assumptions correct ?
ie QListView is designed for one column, but I wonder about QListWidget

wysota
26th February 2006, 14:38
Are both assumptions correct ?
Yes.

ie QListView is designed for one column, but I wonder about QListWidget
QListWidget is a QListView with internal model so that a user can operate on QListWiegetItem objects instead of indexes of the model.

In your case you should use QTreeView or QTreeWidget.