summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorJens Bache-Wiig <jens.bache-wiig@digia.com>2014-04-09 14:20:13 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-09 18:23:48 +0200
commitd5d31fc8847b65e121300806dea935029766f781 (patch)
tree01182c46cbdd83a85bad92a6be77f5a04b661f50 /examples
parent2c58064fe0ae1c2a8abdb6425844785ebb2a09a5 (diff)
downloadqtquickcontrols-d5d31fc8847b65e121300806dea935029766f781.tar.gz
Fix the editable delegate in tableview example
We re-interpreted what "model" means in TableView to align it with what it means for ListView. Unfortunately the example still assume that "model" refers to the views acual model object and not to the current item data as it did for listview. Change-Id: I3457954a622be38500672edb1c0a910d18760947 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/quick/controls/tableview/main.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/quick/controls/tableview/main.qml b/examples/quick/controls/tableview/main.qml
index 40ea8c39..e90e1104 100644
--- a/examples/quick/controls/tableview/main.qml
+++ b/examples/quick/controls/tableview/main.qml
@@ -286,9 +286,9 @@ Window {
target: loaderEditor.item
onAccepted: {
if (typeof styleData.value === 'number')
- model.setProperty(styleData.row, styleData.role, Number(parseFloat(loaderEditor.item.text).toFixed(0)))
+ largeModel.setProperty(styleData.row, styleData.role, Number(parseFloat(loaderEditor.item.text).toFixed(0)))
else
- model.setProperty(styleData.row, styleData.role, loaderEditor.item.text)
+ largeModel.setProperty(styleData.row, styleData.role, loaderEditor.item.text)
}
}
sourceComponent: styleData.selected ? editor : null