Results 1 to 4 of 4

Thread: Can a QListView support multi-column?

  1. #1
    Join Date
    Feb 2008
    Posts
    49
    Thanks
    2
    Thanked 4 Times in 1 Post

    Default 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/

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Can a QListView support multi-column?

    Quote Originally Posted by wesley View Post
    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.

    I notice that there is a interface setModelColumn() , does it work?
    QListView can represent a single column. This sets the column it represents.

    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?
    J-P Nurmi

  3. #3
    Join Date
    Feb 2008
    Posts
    49
    Thanks
    2
    Thanked 4 Times in 1 Post

    Default 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..!!!

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Can a QListView support multi-column?

    J-P Nurmi

Similar Threads

  1. Replies: 0
    Last Post: 10th November 2006, 13:46
  2. Editable QListView Column ??
    By darpan in forum Qt Programming
    Replies: 1
    Last Post: 3rd May 2006, 18:55
  3. hidden QListView column suddenly visible
    By edb in forum Qt Programming
    Replies: 10
    Last Post: 27th January 2006, 08:00
  4. QListView and column moving
    By gadnio in forum Qt Programming
    Replies: 10
    Last Post: 5th January 2006, 17:13

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.