Initial import from the monolithic Qt.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qdeclarativeloader / data / implicitSize.qml
1 import QtQuick 1.1
2
3 Rectangle {
4     property real implWidth: 0
5     property real implHeight: 0
6     color: "green"
7     width: loader.implicitWidth+50
8     height: loader.implicitHeight+50
9
10     Loader {
11         id: loader
12         sourceComponent: Item {
13             anchors.centerIn: parent
14
15             implicitWidth: 100
16             implicitHeight: 100
17             Rectangle {
18                 color: "red"
19                 anchors.fill: parent
20             }
21         }
22
23         anchors.fill: parent
24         anchors.margins: 50
25         onImplicitWidthChanged: implWidth = implicitWidth
26         onImplicitHeightChanged: implHeight = loader.implicitHeight
27     }
28 }