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

« back to all changes in this revision

Viewing changes to tests/auto/quick/qquickloader/data/sizebound.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
    width: 200; height: 200
 
5
 
 
6
    function switchComponent() {
 
7
        load.sourceComponent = comp2
 
8
    }
 
9
 
 
10
    Component {
 
11
        id: comp
 
12
        Rectangle {
 
13
            width: 50; height: 60; color: "red"
 
14
        }
 
15
    }
 
16
 
 
17
    Component {
 
18
        id: comp2
 
19
        Rectangle {
 
20
            width: 80; height: 90; color: "green"
 
21
        }
 
22
    }
 
23
 
 
24
    Loader {
 
25
        id: load
 
26
        objectName: "loader"
 
27
        sourceComponent: comp
 
28
        height: item ? item.height : 0
 
29
    }
 
30
}