Results 1 to 2 of 2

Thread: Can QListview Display Model Column other than Column 0?

  1. #1
    Join Date
    Sep 2015
    Location
    Ontario, Canada
    Posts
    28
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Can QListview Display Model Column other than Column 0?

    I have a Model that I'm using in a QTableview that is displaying labels in column 0, and dynamic signal data (the important parts) in column 1. I want to give the user an alternative view choice that just displays the signal data only, without the signal names beside them, (the names are available in a ToolTip) in labels that will rearrange themselves into an appropriate number of columns to fill up the space of the window.

    QListView seems to be perfect for this, but upon testing I found that QListView displays column 0 by default and I can't seem to find a way to change the displayed column to column 1 which is the important one. Is there a way to change the column, or will the best way of doing this be to have a separate model for the QListView? I wanted to avoid having a second model that has to always be updated as data comes in, especially when it will be exactly the same as column 1 in my current model, but if there's no better way of doing what I want to then I'll settle for having a second model.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Can QListview Display Model Column other than Column 0?


  3. The following user says thank you to anda_skoa for this useful post:

    TEAmerc (20th November 2015)

Similar Threads

  1. Map QSqlTableModel Column 2 To QListView
    By donmorr in forum Qt Programming
    Replies: 3
    Last Post: 27th November 2023, 14:49
  2. How to get count of items in QListView column?
    By qt-closer in forum Qt Programming
    Replies: 3
    Last Post: 25th October 2010, 14:40
  3. Can a QListView support multi-column?
    By wesley in forum Qt Programming
    Replies: 3
    Last Post: 7th March 2008, 08:00
  4. Editable QListView Column ??
    By darpan in forum Qt Programming
    Replies: 1
    Last Post: 3rd May 2006, 18:55
  5. 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.