summaryrefslogtreecommitdiff
path: root/src/controls/TableView.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2013-05-16 11:08:19 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-17 10:05:21 +0200
commit75642c485ce958d5a6ed7c294e5a535abb4ca506 (patch)
tree4c71df49d6888feaaa6b9b283c7890342fd42c39 /src/controls/TableView.qml
parent69a9572261d44358c083ee5d8802d5042b3a470c (diff)
downloadqtquickcontrols-75642c485ce958d5a6ed7c294e5a535abb4ca506.tar.gz
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>
Diffstat (limited to 'src/controls/TableView.qml')
-rw-r--r--src/controls/TableView.qml1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/controls/TableView.qml b/src/controls/TableView.qml
index 4441207e..46e1d97d 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