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...
Attachments
For Gerrit Dashboard: QTBUG-125157 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
568680,2 | Docs: Clarify the snippet about Editing Cells in a TableView | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
569171,2 | Docs: Clarify the snippet about Editing Cells in a TableView | 6.8 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
569306,2 | Docs: Clarify the snippet about Editing Cells in a TableView | 6.7 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
569502,2 | Docs: Clarify the snippet about Editing Cells in a TableView | tqtc/lts-6.5 | qt/tqtc-qtdeclarative | Status: MERGED | +2 | 0 |