diff --git a/examples/quick/controls/tableview/main.qml b/examples/quick/controls/tableview/main.qml index 17e97bc1206cee9e8e4692a86f7136f5bfe4e926..0e5683147405371df385c93ad58a08e6d51057d5 100644 --- a/examples/quick/controls/tableview/main.qml +++ b/examples/quick/controls/tableview/main.qml @@ -302,9 +302,9 @@ Window { target: loaderEditor.item onAccepted: { if (typeof itemValue === 'number') - model.setProperty(rowIndex, role, Number(parseFloat(loaderEditor.item.text).toFixed(0))) + model.setProperty(row, role, Number(parseFloat(loaderEditor.item.text).toFixed(0))) else - model.setProperty(rowIndex, role, loaderEditor.item.text) + model.setProperty(row, role, loaderEditor.item.text) } } sourceComponent: itemSelected ? editor : null diff --git a/src/controls/TableView.qml b/src/controls/TableView.qml index 132351b5305e40b1ac32cfdab723e7984f78f6d2..c954b2a1eb233a7f608fc2238d38a0f404ed70c0 100644 --- a/src/controls/TableView.qml +++ b/src/controls/TableView.qml @@ -131,8 +131,8 @@ ScrollView { \li itemSelected - if the item is currently selected \li itemValue - the value or text for this item \li itemTextColor - the default text color for an item - \li rowIndex - the index of the row - \li columnIndex - the index of the column + \li row - the index of the row + \li column - the index of the column \li itemElideMode - the elide mode of the column \li itemTextAlignment - the horizontal text alignment of the column \endlist @@ -421,7 +421,7 @@ ScrollView { delegate: Item { id: rowitem - width: row.width + width: itemrow.width height: rowstyle.height property int rowIndex: model.index @@ -442,14 +442,14 @@ ScrollView { // Note: these properties should be mirrored in the row filler as well readonly property bool alternateBackground: rowitem.alternateBackground readonly property bool rowSelected: rowitem.ListView.isCurrentItem - readonly property int index: rowitem.rowIndex + readonly property int row: rowitem.rowIndex readonly property var model: listView.model readonly property var modelData: rowitem.itemModelData readonly property var itemModel: rowitem.itemModel readonly property bool hasActiveFocus: root.activeFocus } Row { - id: row + id: itemrow anchors.left: parent.left height: parent.height Repeater { @@ -469,8 +469,8 @@ ScrollView { property var itemValue: __getValue() property bool itemSelected: rowitem.ListView.isCurrentItem property color itemTextColor: itemSelected ? __style.highlightedTextColor : __style.textColor - property int rowIndex: rowitem.rowIndex - property int columnIndex: index + property int row: rowitem.rowIndex + property int column: index property int itemElideMode: columns[index].elideMode property int itemTextAlignment: columns[index].horizontalAlignment property string role: columns[index].role