summaryrefslogtreecommitdiffstats
path: root/examples/declarative/fonts/hello.qml
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2009-11-03 01:54:57 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2009-11-03 01:54:57 (GMT)
commit9063457d08b2bcc8c055f6f0370f73360e6ec1dc (patch)
treed0bbae0c62ded054c5de1e3e3b394a94c2c0758c /examples/declarative/fonts/hello.qml
parent1e8034a10d2496d7fb7aa987357333c6e2c3258d (diff)
downloadQt-9063457d08b2bcc8c055f6f0370f73360e6ec1dc.zip
Qt-9063457d08b2bcc8c055f6f0370f73360e6ec1dc.tar.gz
Qt-9063457d08b2bcc8c055f6f0370f73360e6ec1dc.tar.bz2
* add more font examples
* add missing properties to QmlFontValueType
Diffstat (limited to 'examples/declarative/fonts/hello.qml')
-rw-r--r--examples/declarative/fonts/hello.qml27
1 files changed, 27 insertions, 0 deletions
diff --git a/examples/declarative/fonts/hello.qml b/examples/declarative/fonts/hello.qml
new file mode 100644
index 0000000..6aef3e6
--- /dev/null
+++ b/examples/declarative/fonts/hello.qml
@@ -0,0 +1,27 @@
+import Qt 4.6
+
+Rectangle {
+ id: screen; width: 800; height: 480; color: "black"
+
+ Item {
+ id: container; x: screen.width / 2; y: screen.height / 2
+ Text {
+ id: text; color: "white"; anchors.centerIn: parent
+ text: "Hello world!"; font.pixelSize: 60
+
+ font.letterSpacing: SequentialAnimation {
+ repeat: true; running: true
+ NumberAnimation { from: 100; to: 300; easing: "easeInQuad"; duration: 3000 }
+ ScriptAction { script: {
+ container.y = (screen.height / 4) + (Math.random() * screen.height / 2)
+ container.x = (screen.width / 4) + (Math.random() * screen.width / 2)
+ } }
+ }
+ opacity: SequentialAnimation {
+ repeat: true; running: true
+ NumberAnimation { from: 1; to: 0; duration: 2600 }
+ PauseAnimation { duration: 400 }
+ }
+ }
+ }
+}