Can a QListView support multi-column?
I am using Qtopia4.3.2 to implement a multi-column list view.
But I don't want to use QTreeView. Because it seems more expensive on resource.
and I don't need a hierarchical architecture.
I want my list view work like a QListView, but i may have some column in one item.
I notice that there is a interface setModelColumn() , does it work?
Can some one give me some suggestion>? thanks/
Re: Can a QListView support multi-column?
Quote:
Originally Posted by
wesley
I am using Qtopia4.3.2 to implement a multi-column list view.
But I don't want to use QTreeView. Because it seems more expensive on resource.
and I don't need a hierarchical architecture.
There is no such thing as columns in QListView. QListView represents a flow of items. The flow of items can be in "list mode" or "icon mode" and optionally it can be wrapping. Multiple columns do not fit to this concept.
Quote:
I notice that there is a interface setModelColumn() , does it work?
QListView can represent a single column. This sets the column it represents.
Quote:
Can some one give me some suggestion>? thanks/
QTreeView is the way to go, unless you want to write a view of your own, which would be a big amount of work. Did you notice QTreeView::uniformRowHeights?
Re: Can a QListView support multi-column?
yes, I had tried to implement it use QListView, but it seems very hard.
and now, i am prefer the QTreeView,. How can i do the maximum optimizations if I want to my multi-column list view work like a QListView, just can show some column on one item, of course, the columns on one row item haf focus.
So, I don't need the QTreeView's hierarchical architecture, and its expand/collapse, etc.
HOw can i have a prefer multi-column list view? Is there some example?
thank you..!!!
Re: Can a QListView support multi-column?
Take a look at various QTreeView properties: