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

New layoutChanged handling in ListView / DelegateModel does not work with rootIndex property

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.3.2
    • 5.3.1
    • None
    • MSVC-2010 5.3.1 (snapshot)
    • 692c0d3526b4bd5e5b17e17b4a6547046c2bfcbc

    Description

      The fix for QTBUG-37983 does not work correctly when the DelegateModel specifies a non-root index from a QAbstractItemModel.

      Please run the attached example that uses the same model for a QTreeView and nested QML ListViews. You'll notice when you click the "reverse sort order" button in the QML view, that the QTreeView correctly responds to the sort command (by handling the layoutChanged signal), but the QML ListView does not sort the "2-0, 2-1, etc" rows correctly.

      Technically this is a regression from 5.3.0, but of course 5.3.0 handled layoutChanged by issuing a reset, which was obviously bad behavior. Please let me know if anything is unclear, but I hope the example will be useful for testing.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-39492
          # Subject Branch Project Status CR V

          Activity

            People

              dvratil Daniel Vrátil
              apmontgo Alex Montgomery
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes