Replies: 1 comment 3 replies
-
I've just discovered that I can do something like this. I am not sure if this has any unwanted side-effects. Please do comment! property <int> value: 10;
property <int> original;
init => { origanal = value; } |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was inspecting the example given in
Timer
's docs https://docs.slint.dev/latest/docs/slint/reference/timer/. For convenience, I will repeat here:My question is, how can I replace the
10
ofclicked() => { value = 10; timer.running = true; }
above with something that references the original value of the propertyvalue
? I tried to addproperty <int> original: value;
, but that seems always references the propertyvalue
instead of reading it once and acting like a constant.Beta Was this translation helpful? Give feedback.
All reactions