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

QConcatenateTablesProxyModel does not react to rowsAboutToBeMoved/rowsMoved

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • 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)

    Description

      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.

       

       

       

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes