summaryrefslogtreecommitdiffstats
path: root/examples/declarative/fillmode/fillmode.qml
blob: 9e22885681dd87a80aeabfa26ca6dc6c0827baeb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import Qt 4.6

Image {
    width: 400
    height: 250
    source: "face.png"
    fillMode: SequentialAnimation {
        running: true
        repeat: true
        SetPropertyAction { value: "Stretch" }
        SetPropertyAction { target: Label; property: "text"; value: "Stretch" }
        PauseAnimation { duration: 1000 }
        SetPropertyAction { value: "PreserveAspectFit" }
        SetPropertyAction { target: Label; property: "text"; value: "PreserveAspectFit" }
        PauseAnimation { duration: 1000 }
        SetPropertyAction { value: "PreserveAspectCrop" }
        SetPropertyAction { target: Label; property: "text"; value: "PreserveAspectCrop" }
        PauseAnimation { duration: 1000 }
        SetPropertyAction { value: "Tile" }
        SetPropertyAction { target: Label; property: "text"; value: "Tile" }
        PauseAnimation { duration: 1000 }
        SetPropertyAction { value: "TileHorizontally" }
        SetPropertyAction { target: Label; property: "text"; value: "TileHorizontally" }
        PauseAnimation { duration: 1000 }
        SetPropertyAction { value: "TileVertically" }
        SetPropertyAction { target: Label; property: "text"; value: "TileVertically" }
        PauseAnimation { duration: 1000 }
    }
    Text {
        id: Label
        font.pointSize: 24
        color: "blue"
        style: "Outline"
        styleColor: "white"
        anchors { centerIn: parent }
    }
    Rect {
        border.color: "black"
        color: "transparent"
        anchors { fill: parent; rightMargin: 1; bottomMargin: 1}
    }
}