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

« back to all changes in this revision

Viewing changes to tests/auto/qml/qqmlecmascript/data/propertyVar.7.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
Item {
 
4
    property bool test: false
 
5
 
 
6
    property var attributes: { 'color': 'red', 'width': 100 }
 
7
    property int bound: attributes.width
 
8
 
 
9
    Component.onCompleted: {
 
10
        if (bound != 100) return;
 
11
 
 
12
        attributes = { 'color': 'blue', 'width': 200 }   // bound should now be 200
 
13
 
 
14
        if (bound != 200) return;
 
15
 
 
16
        test = true;
 
17
    }
 
18
}