summaryrefslogtreecommitdiffstats
path: root/examples/declarative/anchors/anchor-changes.qml
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-02-14 23:08:01 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-02-14 23:08:01 (GMT)
commit2d23e45c94b6115db2b1efadfe77841f481545ca (patch)
tree0e6ff89dbcc410dd2ef5b0e873473971f3dd1b07 /examples/declarative/anchors/anchor-changes.qml
parent65e0628bd0cdcb43226dad05582a97a6ef218124 (diff)
parent42dda19d82ceea48f19d356cfaf2b26acb763df8 (diff)
downloadQt-2d23e45c94b6115db2b1efadfe77841f481545ca.zip
Qt-2d23e45c94b6115db2b1efadfe77841f481545ca.tar.gz
Qt-2d23e45c94b6115db2b1efadfe77841f481545ca.tar.bz2
Merge remote branch 'origin/master' into bearermanagement/integration
Conflicts: tests/auto/qlineedit/tst_qlineedit.cpp
Diffstat (limited to 'examples/declarative/anchors/anchor-changes.qml')
-rw-r--r--examples/declarative/anchors/anchor-changes.qml46
1 files changed, 46 insertions, 0 deletions
diff --git a/examples/declarative/anchors/anchor-changes.qml b/examples/declarative/anchors/anchor-changes.qml
new file mode 100644
index 0000000..2ebe1c0
--- /dev/null
+++ b/examples/declarative/anchors/anchor-changes.qml
@@ -0,0 +1,46 @@
+import Qt 4.6
+
+Item {
+ id: window
+ width: 200; height: 450
+
+ Rectangle {
+ id: titleBar; color: "Gray"
+ anchors.top: parent.top; height: 50
+ width: parent.width
+ }
+
+ Rectangle {
+ id: statusBar; color: "Gray"
+ height: 50; anchors.bottom: parent.bottom
+ width: parent.width
+ }
+
+ Rectangle {
+ id: content
+ anchors.top: titleBar.bottom; anchors.bottom: statusBar.top
+ width: parent.width
+
+ Text { text: "Top"; anchors.top: parent.top }
+ Text { text: "Bottom"; anchors.bottom: parent.bottom }
+ }
+
+ MouseRegion {
+ anchors.fill: content
+ onPressed: window.state = "FullScreen"
+ onReleased: window.state = ""
+ }
+
+ states : State {
+ name: "FullScreen"
+ //! [0]
+ AnchorChanges {
+ target: content; top: window.top; bottom: window.bottom
+ }
+ //! [0]
+ }
+
+ transitions : Transition {
+ NumberAnimation { matchProperties: "y,height" }
+ }
+}