diff options
author | J-P Nurmi <jpnurmi@digia.com> | 2014-05-06 08:35:00 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-06 22:03:44 +0200 |
commit | 574837306cbe95a0560882cefed16799752254bc (patch) | |
tree | 7a685a92be9f7813c7e6583096df7e982ce4a29e /src/controls/TableView.qml | |
parent | 57ec8ef7265365c39662c9602b2d9976b025622a (diff) | |
download | qtquickcontrols-574837306cbe95a0560882cefed16799752254bc.tar.gz |
TableView: fix styleData.row to be a binding
Must be a binding to keep the index up-to-date when moving rows.
Task-number: QTBUG-38789
Change-Id: Ibd2fe34d7afccc523d563351bd3366c7c7c66635
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Diffstat (limited to 'src/controls/TableView.qml')
-rw-r--r-- | src/controls/TableView.qml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/controls/TableView.qml b/src/controls/TableView.qml index 85ff4019..75e1b4e1 100644 --- a/src/controls/TableView.qml +++ b/src/controls/TableView.qml @@ -819,7 +819,7 @@ ScrollView { rowItemContainer.height = Qt.binding( function() { return rowItem.height }); // Reassign row-specific bindings - rowItem.rowIndex = model.index; + rowItem.rowIndex = Qt.binding( function() { return model.index }); rowItem.itemModelData = Qt.binding( function() { return typeof modelData === "undefined" ? null : modelData }); rowItem.itemModel = Qt.binding( function() { return model }); rowItem.parent = rowItemContainer; |