summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2014-05-06 08:35:00 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-06 22:03:44 +0200
commit574837306cbe95a0560882cefed16799752254bc (patch)
tree7a685a92be9f7813c7e6583096df7e982ce4a29e
parent57ec8ef7265365c39662c9602b2d9976b025622a (diff)
downloadqtquickcontrols-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>
-rw-r--r--src/controls/TableView.qml2
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;