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

QQmlTableModel is not notifying about changes of its data

    XMLWordPrintable

Details

    • 3f876d603 (dev), 112d5152f (6.9)
    • Foundation Sprint 129

    Description

      The QQmlTreeModel has the following properties:

      Q_PROPERTY(int columnCount READ columnCount NOTIFY columnCountChanged FINAL) Q_PROPERTY(int rowCount READ rowCount NOTIFY rowCountChanged FINAL) Q_PROPERTY(QVariant rows READ rows WRITE setRows NOTIFY rowsChanged FINAL)
      

      However, the current code does not emit rowsChanged when the data and thus the return value of rows() changes. e.g. in insertRow:

          // Gather metadata the first time a row is added.
          if (mColumnMetadata.isEmpty())
              fetchColumnMetadata();
      
          endInsertRows();
          emit rowCountChanged();
      

      The effect is that application developers get not informed about changes when they connect to onRowsChanged. rowCountChanged is only emited when the number of rows changed so it is not sufficient.

      Attachments

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

        Activity

          People

            mate Máté Barany
            matthias_rauter Matthias Rauter
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes