Skip to content

Instantly share code, notes, and snippets.

@ilkka
Created December 23, 2010 13:36
Show Gist options
  • Select an option

  • Save ilkka/752979 to your computer and use it in GitHub Desktop.

Select an option

Save ilkka/752979 to your computer and use it in GitHub Desktop.
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);
}
}
}
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");
}
}
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