aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicknativestyle/controls/DefaultTreeViewDelegate.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/quicknativestyle/controls/DefaultTreeViewDelegate.qml')
-rw-r--r--src/quicknativestyle/controls/DefaultTreeViewDelegate.qml8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/quicknativestyle/controls/DefaultTreeViewDelegate.qml b/src/quicknativestyle/controls/DefaultTreeViewDelegate.qml
index a15b4d36f1..89130947bb 100644
--- a/src/quicknativestyle/controls/DefaultTreeViewDelegate.qml
+++ b/src/quicknativestyle/controls/DefaultTreeViewDelegate.qml
@@ -69,6 +69,7 @@ T.TreeViewDelegate {
// The edit delegate is a separate component, and doesn't need
// to follow the same strict rules that are applied to a control.
// qmllint disable attached-property-reuse
+ // qmllint disable controls-attached-property-reuse
// qmllint disable controls-sanity
TableView.editDelegate: FocusScope {
width: parent.width
@@ -76,7 +77,7 @@ T.TreeViewDelegate {
readonly property int __role: {
let model = control.treeView.model
- let index = control.treeView.modelIndex(column, row)
+ let index = control.treeView.index(row, column)
let editText = model.data(index, Qt.EditRole)
return editText !== undefined ? Qt.EditRole : Qt.DisplayRole
}
@@ -86,17 +87,18 @@ T.TreeViewDelegate {
x: control.contentItem.x
y: (parent.height - height) / 2
width: control.contentItem.width
- text: control.treeView.model.data(control.treeView.modelIndex(column, row), __role)
+ text: control.treeView.model.data(control.treeView.index(row, column), __role)
focus: true
}
TableView.onCommit: {
- let index = TableView.view.modelIndex(column, row)
+ let index = TableView.view.index(row, column)
TableView.view.model.setData(index, textField.text, __role)
}
Component.onCompleted: textField.selectAll()
}
// qmllint enable attached-property-reuse
+ // qmllint enable controls-attached-property-reuse
// qmllint enable controls-sanity
}