aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicktableview/data
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2018-08-01 22:53:17 +0200
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2018-08-02 15:53:58 +0000
commitfe1a259be66835bc937890f3ed62bb2e8496d0f1 (patch)
tree12453b09306764e679cb45af9de417c38101f572 /tests/auto/quick/qquicktableview/data
parente997cd013a665505bd2d33a3e4b76e27752bcb39 (diff)
QQmlTableInstanceModel: handle model data changes more gracefully
Equal to QQmlDelegateModel, we need to listen for changes done to existing model items, and notify existing delegate items about it. Otherwise, they will not stay in sync with the model. By accident, this sort of worked in QQuickTableView already, since it would rebuild the whole table for every model update. This is really slow, and completely unnecessary. Change-Id: I10750ff387f8b455d0f27c50a17926d9beb6dd03 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto/quick/qquicktableview/data')
-rw-r--r--tests/auto/quick/qquicktableview/data/plaintableview.qml3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/quick/qquicktableview/data/plaintableview.qml b/tests/auto/quick/qquicktableview/data/plaintableview.qml
index 36c28525d5..21373e6732 100644
--- a/tests/auto/quick/qquicktableview/data/plaintableview.qml
+++ b/tests/auto/quick/qquicktableview/data/plaintableview.qml
@@ -71,6 +71,9 @@ Item {
implicitHeight: delegateHeight
color: "lightgray"
border.width: 1
+
+ property string modelDataBinding: modelData
+
Text {
anchors.centerIn: parent
text: modelData