qtdeclarative/tests/auto/qml/qmlcppcodegen/data/trivialSignalHandler.qml

18 lines
470 B
QML
Raw Normal View History

pragma Strict
import QtQml
QtObject {
property string a: "no"
property int b: -1
property real c: -1
signal thingHappened(thing: int)
signal otherThingHappened(otherThing: real)
onObjectNameChanged: function() { a = objectName }
onAChanged: () => { thingHappened(5) }
onThingHappened: (thing) => { b = thing }
onBChanged: function() { otherThingHappened(b) }
onOtherThingHappened: function(otherThing) { c = otherThing / 2 }
}