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

TreeView from Qt 6.3 is not re-sorted when dynamicSortFilter is set in the QSortFilterProxyModel

    XMLWordPrintable

Details

    • Windows
    • 96e70f2366 (qt/qtdeclarative/dev) 96e70f2366 (qt/tqtc-qtdeclarative/dev) d3314c7412 (qt/qtdeclarative/6.4) d3314c7412 (qt/tqtc-qtdeclarative/6.4) d3314c7412 (qt/qtdeclarative/6.4.1)

    Description

      Seems that dynamic sort set in the QSortFilterProxyModel does not work with the new QML TreeView.

      When dynamicSortFilter property of the model is set to true, the view gets sorted, but it is not re-sorted after changes made to the model.

      Attached gif shows TableView which works as expected on the left and TreeView on the right.

      I used the most recent 6.4 dev snapshot in the Maintenance Tool.

      Tree model is based on https://code.qt.io/cgit/qt/qtbase.git/tree/examples/widgets/itemviews/editabletreemodel

      Full example code is available at: https://bitbucket.org/vser35/qt-qml-treeview-incorrect-dynamicsortfilter

      Attachments

        Activity

          People

            richard Richard Moe Gustavsen
            vserdyuk Vladimir Serdyuk
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: