tests/auto/declarative/qdeclarativeitem/data/childrenRectBug2.qml
changeset 33 3e2da88830cd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug2.qml	Wed Aug 18 10:37:55 2010 +0300
@@ -0,0 +1,53 @@
+import Qt 4.7
+
+Rectangle {
+    width:360;
+    height: 200
+
+    Item {
+        objectName: "theItem"
+        anchors.centerIn: parent
+        width: childrenRect.width
+        height: childrenRect.height
+        Rectangle {
+            id: header1
+            anchors.horizontalCenter: parent.horizontalCenter
+            anchors.top: parent.top
+            width: 100; height: 50
+            color: "green"
+        }
+        Rectangle {
+            id: text1
+            anchors.top: header1.bottom
+            anchors.topMargin: 10
+            anchors.horizontalCenter: parent.horizontalCenter
+            width: 100; height: 50
+            color: "blue"
+        }
+    }
+
+    states: [
+    State {
+        name: "row"
+        AnchorChanges {
+            target: header1
+            anchors.horizontalCenter: undefined
+            anchors.verticalCenter: parent.verticalCenter
+            anchors.left: parent.left
+            anchors.top: undefined
+        }
+        AnchorChanges {
+            target: text1
+            anchors.horizontalCenter: undefined
+            anchors.verticalCenter: parent.verticalCenter
+            anchors.top: undefined
+            anchors.left: header1.right
+        }
+        PropertyChanges {
+            target: text1
+            anchors.leftMargin: 10
+            anchors.topMargin: 0
+        }
+    }
+    ]
+}