From d5d31fc8847b65e121300806dea935029766f781 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig <jens.bache-wiig@digia.com> Date: Wed, 9 Apr 2014 14:20:13 +0200 Subject: [PATCH] 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> --- examples/quick/controls/tableview/main.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/quick/controls/tableview/main.qml b/examples/quick/controls/tableview/main.qml index 40ea8c39c..e90e11043 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 -- GitLab