Created
December 23, 2010 13:36
-
-
Save ilkka/752979 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Qt 4.7 | |
| Item { | |
| width : 400 | |
| height : 400 | |
| Outer { | |
| anchors.fill : parent | |
| onFooChanged : console.log("Got Foo " + foo) | |
| // Comment this away and the above handler stops printing | |
| Component.onCompleted: { | |
| console.log("Foo at beginning is " + foo); | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Qt 4.7 | |
| Item { | |
| property int foo : 1 | |
| Timer { | |
| interval: 1000; running: true; repeat: true | |
| onTriggered: { | |
| console.log("Triggered"); | |
| foo = foo *2; | |
| } | |
| } | |
| // This works just fine | |
| onFooChanged: { | |
| console.log("Inner onFooChanged"); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Qt 4.7 | |
| Item { | |
| property alias foo : inner.foo | |
| Inner { | |
| id : inner | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment