summaryrefslogtreecommitdiff
path: root/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug2.qml
diff options
context:
space:
mode:
authorMatthew Vogt <matthew.vogt@nokia.com>2012-01-30 14:16:15 +1000
committerMatthew Vogt <matthew.vogt@nokia.com>2012-01-30 14:16:15 +1000
commit12a5ddf456ba8549645a8cb28a8b4ed6197a14da (patch)
tree63ee2c88af936e0609a3a194f5bcc304c4c0b707 /tests/auto/declarative/qdeclarativeitem/data/childrenRectBug2.qml
downloadqtquick1-12a5ddf456ba8549645a8cb28a8b4ed6197a14da.tar.gz
Import relevant source from Qt 4.8
Change-Id: I5078db4081d95290c54f39d3c0efc2fc2f62e6a6
Diffstat (limited to 'tests/auto/declarative/qdeclarativeitem/data/childrenRectBug2.qml')
-rw-r--r--tests/auto/declarative/qdeclarativeitem/data/childrenRectBug2.qml53
1 files changed, 53 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug2.qml b/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug2.qml
new file mode 100644
index 00000000..d67ad0e3
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug2.qml
@@ -0,0 +1,53 @@
+import QtQuick 1.0
+
+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
+ }
+ }
+ ]
+}