summaryrefslogtreecommitdiff
path: root/src/controls/ScrollView.qml
diff options
context:
space:
mode:
authorCaroline Chao <caroline.chao@digia.com>2013-03-07 10:06:27 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-07 18:32:44 +0100
commit060a6afdf851ca4dbe05f19f3ad3cd486740fafa (patch)
tree959ac2c30ea336b5c96f84529be344e2018aaabd /src/controls/ScrollView.qml
parent8c74c603e9bfcc7bb19366df1cc2ef3f4ed6cb1f (diff)
downloadqtquickcontrols-060a6afdf851ca4dbe05f19f3ad3cd486740fafa.tar.gz
ScrollView: Fix when the item added is not a Flickable
The Flickable item created becomes the parent of the ScrollView contentItem. Change-Id: I488d9f8ffc02a1de1158b279e0971473a3386e2c Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src/controls/ScrollView.qml')
-rw-r--r--src/controls/ScrollView.qml2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/controls/ScrollView.qml b/src/controls/ScrollView.qml
index 9c69bc18..320cb823 100644
--- a/src/controls/ScrollView.qml
+++ b/src/controls/ScrollView.qml
@@ -146,7 +146,7 @@ FocusScope {
internal.flickableItem = contentItem // "Use content if it is a flickable
} else {
internal.flickableItem = flickableComponent.createObject(this)
- contentItem.parent = flickableItem.contentItem
+ contentItem.parent = internal.flickableItem
}
internal.flickableItem.parent = viewportItem
internal.flickableItem.anchors.fill = viewportItem