Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-17068

ListView sections are not updated on item changes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.7.4
    • 4.7.0, 4.7.1
    • None
    • Tested on Kubuntu 10.10, Qt version 4:4.7.0-0ubuntu4.2. Seems that bug is also applicable for Qt 4.7.1
    • e57716ad44e5894890d662f9ac596b70c109104f

    Description

      I'm using QML ListView with sections to display content of my own QSortFilterProxyModel. Seems that sections are not updated when some item in a list has changed.
      I'm attaching test application (based on Qt's abstractItemModel example) to demonstrate the issue. This application shows list of animals sorted by name.

      • Run ./abstractitemmodel
      • Click on 'Set best' for some 'CAnimal' item in the middle of the list
        Expected result: 'CAnimal' shall be placed on top of list, Section name on top shall be 'Best'
        Actual result: 'CAnimal' is placed on top of list BUT section names are not updated

      I've also found a workaround how to refresh the list ("Refresh list" button in my example) - if you set impossible search criteria, and then unset search criteria - the list will be refreshed with correct section names.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            martjone Martin Jones (closed Nokia identity) (Inactive)
            mvnosov Michael Nosov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes