summaryrefslogtreecommitdiffstats
path: root/examples/declarative/fillmode/fillmode.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/fillmode/fillmode.qml')
-rw-r--r--examples/declarative/fillmode/fillmode.qml42
1 files changed, 42 insertions, 0 deletions
diff --git a/examples/declarative/fillmode/fillmode.qml b/examples/declarative/fillmode/fillmode.qml
new file mode 100644
index 0000000..d3a28e2
--- /dev/null
+++ b/examples/declarative/fillmode/fillmode.qml
@@ -0,0 +1,42 @@
+import Qt 4.6
+
+Image {
+ width: 400
+ height: 250
+ source: "face.png"
+ fillMode: SequentialAnimation {
+ running: true
+ repeat: true
+ PropertyAction { value: Image.Stretch }
+ PropertyAction { target: label; property: "text"; value: "Stretch" }
+ PauseAnimation { duration: 1000 }
+ PropertyAction { value: Image.PreserveAspectFit }
+ PropertyAction { target: label; property: "text"; value: "PreserveAspectFit" }
+ PauseAnimation { duration: 1000 }
+ PropertyAction { value: Image.PreserveAspectCrop }
+ PropertyAction { target: label; property: "text"; value: "PreserveAspectCrop" }
+ PauseAnimation { duration: 1000 }
+ PropertyAction { value: Image.Tile }
+ PropertyAction { target: label; property: "text"; value: "Tile" }
+ PauseAnimation { duration: 1000 }
+ PropertyAction { value: Image.TileHorizontally }
+ PropertyAction { target: label; property: "text"; value: "TileHorizontally" }
+ PauseAnimation { duration: 1000 }
+ PropertyAction { value: Image.TileVertically }
+ PropertyAction { target: label; property: "text"; value: "TileVertically" }
+ PauseAnimation { duration: 1000 }
+ }
+ Text {
+ id: label
+ font.pointSize: 24
+ color: "blue"
+ style: Text.Outline
+ styleColor: "white"
+ anchors { centerIn: parent }
+ }
+ Rectangle {
+ border.color: "black"
+ color: "transparent"
+ anchors { fill: parent; rightMargin: 1; bottomMargin: 1}
+ }
+}