~loic.molinari/+junk/qtdeclarative-shadereffectsource-changes

« back to all changes in this revision

Viewing changes to tests/auto/qml/qqmlvaluetypes/data/conflicting.1.qml

  • Committer: Loïc Molinari
  • Date: 2012-04-21 17:59:51 UTC
  • Revision ID: loic.molinari@canonical.com-20120421175951-bqx68caaf5zrp76l
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import QtQuick 2.0
 
2
 
 
3
Rectangle {
 
4
    id: root
 
5
 
 
6
    width: 800
 
7
    height: 600
 
8
 
 
9
    property alias font: myText.font
 
10
 
 
11
    property int myPixelSize: 12
 
12
    property int myPixelSize2: 24
 
13
    
 
14
    Text {
 
15
        id: other
 
16
        font.pixelSize: 6
 
17
    }
 
18
 
 
19
    Text {
 
20
        id: myText
 
21
 
 
22
        text: "Hello world!"
 
23
        font.pixelSize: myPixelSize
 
24
    }
 
25
 
 
26
    states: State {
 
27
        name: "Swapped"
 
28
        PropertyChanges {
 
29
            target: myText
 
30
            font: other.font
 
31
        }
 
32
    }
 
33
 
 
34
    function toggle() {
 
35
        if (root.state == "") root.state = "Swapped"; else root.state = "";
 
36
    }
 
37
 
 
38
    MouseArea {
 
39
        anchors.fill: parent
 
40
        onClicked: { if (root.state == "") root.state = "Swapped"; else root.state = "";}
 
41
    }
 
42
}