Details
-
Suggestion
-
Resolution: Invalid
-
P2: Important
-
None
-
None
-
None
Description
The TreeView QML Type API works on the basis of visible rows, e.g. https://doc.qt.io/qt-6/qml-qtquick-treeview.html#expandRecursively-method "row should be the row in the view (table row), and not a row in the model."
We are working now on a TreeModel QML Type QTBUG-130571 and it will (obviously) have a model row based API or a QModelIndex based API to be exact (similar to QmlTableModel (https://doc.qt.io/qt-6/qml-qt-labs-qmlmodels-tablemodel.html).
So at some point we (and our users) will need (or at least benefit) a mapping from visible row to QModelIndex. The right place would imho be the TreeView in the form of e.g.:
Q_INVOKABLE QModelIndex modelIndex(int row, int column);
Attachments
Issue Links
- resulted from
-
QTBUG-130571 Introduce a QML tree model
-
- In Progress
-