~ubuntu-branches/ubuntu/trusty/qtdeclarative-opensource-src/trusty-updates

« back to all changes in this revision

Viewing changes to tests/auto/quick/qquickloader/data/initialPropertyValues.6.qml

  • Committer: Package Import Robot
  • Author(s): Timo Jyrinki
  • Date: 2013-02-05 14:17:19 UTC
  • Revision ID: package-import@ubuntu.com-20130205141719-qqeyml8wslpyez52
Tags: upstream-5.0.1
ImportĀ upstreamĀ versionĀ 5.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import QtQuick 2.0
 
2
 
 
3
Item {
 
4
    id: root
 
5
    property int initialValue: 0
 
6
    property int behaviorCount: 0
 
7
 
 
8
    Loader {
 
9
        id: loader
 
10
        objectName: "loader"
 
11
        onLoaded: {
 
12
            root.initialValue = loader.item.canary;         // should be six
 
13
            root.behaviorCount = loader.item.behaviorCount; // should be zero
 
14
        }
 
15
    }
 
16
 
 
17
    Item {
 
18
        id: child
 
19
        property int bindable: 6
 
20
    }
 
21
 
 
22
    Component.onCompleted: {
 
23
        loader.setSource("InitialPropertyValuesComponent.qml", {"canary": child.bindable});
 
24
    }
 
25
}