3 ms·
`onClicked` isn't a field. The Button object has, somewhere in its definition: signal clicked() ... /* on some raw mouse event handler */ { clicked
by jcelerier 9y ago
`onClicked` isn't a field.
The Button object has, somewhere in its definition:
signal clicked()
...
/* on some raw mouse event handler */
{
clicked();
}
Then, when `clicked()` is called, if you have put somewhere in your code `onClicked: { some JS expression }`, the expression you put there will be called.
Unlike JS objects, fields cannot be reassigned. Instead properties and signals are declared beforehand.
property real count
signal foo(arg1, arg2)
...