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

QmlTreeModel misses API for insertRow()

XMLWordPrintable

    • 5
    • bb09490ab (dev), 097d499f0 (6.10)

      QmlTableModel has the following API to insert rows at a certain point:

          Q_INVOKABLE void insertRow(int rowIndex, const QVariant &row); 

      QmlTreeModel is missing this API. The closest is 

          Q_INVOKABLE void appendRow(QModelIndex index, const QVariant &row); 

      where the row is appended to the end of the children of index. It would be good to rename the parameter index to parent to make clear where the new row is appended.

      Found in header review.

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

            matthias_rauter Matthias Rauter
            matthias_rauter Matthias Rauter
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There is 1 open Gerrit change