summaryrefslogtreecommitdiffstats
path: root/Qt/examples/declarative/textinput/textinput.qml
diff options
context:
space:
mode:
authorDamian Jansen <damian.jansen@nokia.com>2011-05-09 12:28:18 +1000
committerDamian Jansen <damian.jansen@nokia.com>2011-05-09 12:28:18 +1000
commitc610798aecc76f374c54ed7e7c41119600b858b9 (patch)
tree4b6c704b564dc298b1b981b90cb1227642c18b1f /Qt/examples/declarative/textinput/textinput.qml
parent9dffdfe646f4e30d481e9f146810ae0838fb3936 (diff)
Force applications to be used only in landscape
Diffstat (limited to 'Qt/examples/declarative/textinput/textinput.qml')
-rw-r--r--Qt/examples/declarative/textinput/textinput.qml15
1 files changed, 15 insertions, 0 deletions
diff --git a/Qt/examples/declarative/textinput/textinput.qml b/Qt/examples/declarative/textinput/textinput.qml
index 999f1af..916dedb 100644
--- a/Qt/examples/declarative/textinput/textinput.qml
+++ b/Qt/examples/declarative/textinput/textinput.qml
@@ -266,4 +266,19 @@ Rectangle {
}
}
}
+
+ Item {
+ height: runtime.orientation != 2 ? parent.height : 0
+ Behavior on height { NumberAnimation { duration: 200 } }
+ width: runtime.orientation != 2 ? parent.width : 0
+ Behavior on width { NumberAnimation { duration: 200 } }
+ anchors.centerIn: parent
+ Rectangle {
+ height: parent.height - 15; width: parent.width - 15; color: "green"; radius: 10; anchors.centerIn: parent; border.color: "blue"
+ Text { visible: runtime.orientation != 2; width: parent.width - 30; anchors.centerIn: parent; horizontalAlignment: Text.AlignHCenter
+ text: "Please change to landscape orientation\nvia the Settings menu"
+ }
+ }
+ MouseArea { anchors.fill: parent }
+ }
} \ No newline at end of file