Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.5, 6.7
-
None
-
-
9ae58a8e6 (dev), 9930959ac (6.8), 79d64c8e5 (6.7), 6d602b166 (tqtc/lts-6.5)
Description
https://doc.qt.io/qt-6/qml-qtquick-tableview.html#editing-cells states that
TableView.onCommit:
This may be true in case the model is an QAbstractItemModel https://doc.qt.io/qt-6/qabstractitemmodel.html#setData. But in the snippet example a TableModel is used so the signature for setData() is different: https://doc.qt.io/qt-6/qml-qt-labs-qmlmodels-tablemodel.html#setData-method
The code should be:
TableView.view.model.setData(index, "display", text)
Or better still the TableModel's setData() function should maybe have the same signature than QAbstractItemModel's...