From 75642c485ce958d5a6ed7c294e5a535abb4ca506 Mon Sep 17 00:00:00 2001
From: J-P Nurmi <jpnurmi@digia.com>
Date: Thu, 16 May 2013 11:08:19 +0200
Subject: [PATCH] TableView: fix a performance issue with row delegate
 instantiation

To avoid accidentally instantiating all rows at construction time, make
sure the rows have a valid (but arbitrary) height meanwhile the row
delegates haven't yet been loaded.

Change-Id: I1afc6bfa920886260717b3cb172fa0d858c0a8d5
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
---
 src/controls/TableView.qml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/controls/TableView.qml b/src/controls/TableView.qml
index 4441207e7..46e1d97d4 100644
--- a/src/controls/TableView.qml
+++ b/src/controls/TableView.qml
@@ -450,6 +450,7 @@ ScrollView {
                 sourceComponent: root.rowDelegate
                 // Row fills the view width regardless of item size
                 // But scrollbar should not adjust to it
+                height: item ? item.height : 16
                 width: parent.width + __scroller.horizontalScrollBar.width
                 x: flickableItem.contentX
 
-- 
GitLab