Commit d5d31fc8 authored by Jens Bache-Wiig's avatar Jens Bache-Wiig Committed by The Qt Project
Browse files

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: default avatarGabriel de Dietrich <gabriel.dedietrich@digia.com>
Showing with 2 additions and 2 deletions
...@@ -286,9 +286,9 @@ Window { ...@@ -286,9 +286,9 @@ Window {
target: loaderEditor.item target: loaderEditor.item
onAccepted: { onAccepted: {
if (typeof styleData.value === 'number') 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 else
model.setProperty(styleData.row, styleData.role, loaderEditor.item.text) largeModel.setProperty(styleData.row, styleData.role, loaderEditor.item.text)
} }
} }
sourceComponent: styleData.selected ? editor : null sourceComponent: styleData.selected ? editor : null
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment