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

QConcatenateTablesProxyModel does not react to rowsAboutToBeMoved/rowsMoved

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Not Evaluated Not Evaluated
    • 6.8.1, 6.9.0 FF
    • 6.5.3, 6.8.0 Beta4
    • Core: Item Models
    • None
    • macOS
    • b9ba28315 (dev), d53c3809d (6.8)

      When using a QConcatenateTablesProxyModel as the model of QML ListView, the list is not refreshed when we move an item of one of its source models

       

      The attached example displays:

      • a ListView, its model is a QConcatenateTablesProxyModel which uses two source models (2 QQStringListModel)
      • two buttons. Each button triggers a moveRows call on one of the source model used by QConcatenateTablesProxyModel

       

      When we press a button:

      • the QQStringListModel is updated as expected. If we print the content of our QConcatenateTablesProxyModel we get the expected result
      • the listview is not refreshed (items are not reordered)

       

      QConcatenateTablesProxyModel does not subscribe to the rowsAboutToBeMoved and rowsMoved signals of its source models and does not propagate them. It therefore does not notify the QML ListView that it must reorder its items.

       

       

       

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

            dfaure_kdab David Faure
            lemortalexandre Alexandre Lemort
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes