Results 1 to 4 of 4

Thread: How to get count of items in QListView column?

  1. #1
    Join Date
    Oct 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question How to get count of items in QListView column?

    Hello, All

    The QListView widget have enabled isWrapping property, therefore it widget have several columns. How to get count of items per column?

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: How to get count of items in QListView column?

    isWrapping doesn't change columns nor rows. In general ask the underlaying model for any information.

  3. #3
    Join Date
    Oct 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to get count of items in QListView column?

    In general ask the underlaying model for any information.
    Do you know how to do it? or it's your guess?

    P.S.
    I have read docs about QListView, QAbstractItemView, QAbstractItemModel, etc (+ read sources) and didn't found a way how to get count of items per column.

  4. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: How to get count of items in QListView column?

    Quote Originally Posted by qt-closer View Post
    Do you know how to do it? or it's your guess?
    Let me think a minute. Ehm, no, I know it

    I have read docs about QListView, QAbstractItemView, QAbstractItemModel, etc (+ read sources) and didn't found a way how to get count of items per column.
    The problem is, what do you mean by "items per column"? Do you whant the row count? You can also have a look at the header to see, how many columns are actually shown.

Similar Threads

  1. Map QSqlTableModel Column 2 To QListView
    By donmorr in forum Qt Programming
    Replies: 3
    Last Post: 27th November 2023, 15:49
  2. Count indexes in QListView
    By been_1990 in forum Qt Programming
    Replies: 5
    Last Post: 17th December 2009, 20:21
  3. qlistwidget count of selected items
    By tpf80 in forum Newbie
    Replies: 4
    Last Post: 10th December 2009, 14:31
  4. QTableView row/column count [SOLVED]
    By jano_alex_es in forum Newbie
    Replies: 2
    Last Post: 14th May 2009, 12:10
  5. Editable QListView Column ??
    By darpan in forum Qt Programming
    Replies: 1
    Last Post: 3rd May 2006, 19:55

Tags for this Thread

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.