~ubuntu-branches/ubuntu/trusty/qtdeclarative-opensource-src/trusty-updates

« back to all changes in this revision

Viewing changes to tests/auto/qml/qqmlbinding/data/test-binding2.qml

  • Committer: Package Import Robot
  • Author(s): Timo Jyrinki
  • Date: 2013-02-05 14:17:19 UTC
  • Revision ID: package-import@ubuntu.com-20130205141719-qqeyml8wslpyez52
Tags: upstream-5.0.1
ImportĀ upstreamĀ versionĀ 5.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import QtQuick 2.0
 
2
 
 
3
Rectangle {
 
4
    id: screen
 
5
    width: 320; height: 240
 
6
    property string text
 
7
    property bool changeColor: false
 
8
 
 
9
    Text { id: s1; text: "Hello" }
 
10
    Rectangle { id: r1; width: 1; height: 1; color: "yellow" }
 
11
    Rectangle { id: r2; width: 1; height: 1; color: "red" }
 
12
 
 
13
    Binding { target: screen; property: "text"; value: s1.text }
 
14
    Binding { target: screen; property: "color"; value: r1.color }
 
15
    Binding { target: screen; property: "color"; value: r2.color; when: screen.changeColor == true }
 
16
}