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

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

XMLWordPrintable

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

      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.

        1. brokenSort.zip
          4 kB
          Alex Montgomery
        For Gerrit Dashboard: QTBUG-39492
        # Subject Branch Project Status CR V

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes