WelcomeScreen: Only load the tab when it's being requested.

Change-Id: I4cdd10059b4bcbba7db882fca9964a9dcf9a1db4
Reviewed-on: http://codereview.qt.nokia.com/1057
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
Daniel Molkentin
2011-07-04 12:20:37 +02:00
parent 73d3ef0ae6
commit 7aea1ec3d9

View File

@@ -14,12 +14,13 @@ Item {
Repeater {
id: contentRepeater
Loader {
property bool active: index == tabWidget.current
id: pageLoader
clip: true
opacity: index == tabWidget.current
opacity: active
anchors.fill: parent
anchors.margins: 4
source: model.modelData.pageLocation
onActiveChanged: if (active && source == "") source = model.modelData.pageLocation
onStatusChanged: {
if (pageLoader.status == Loader.Error) console.debug(source + ' failed to load')