-
I've build my own widget wrapping LineEdit, which accepts text, int or float and responds to mouse-wheel for increments. Its what I need and it works well. There is only one problem, and its with partial float input. User doesn't always press enter when they are done. They sometimes click off the LineEdit box into another widget (or tab over to next widget), which leaves input as valid parse value for a float, but incomplete. So the value will be left like 2. or 3.00, where it should be parsed into 2 or 3. What can I use in slint to detect focus loss on a LineEdit so that I can do one final parse of a value the same way as I do now on accepted callback (when enter is pressed)? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
This is not really possible. Although there exist hack as shown in issue #112 |
Beta Was this translation helpful? Give feedback.
-
Got it, thank you. Would have kept going with this wrong assumption if you didn't elaborate. https://snapshots.slint.dev/master/docs/slint/src/language/syntax/conditions |
Beta Was this translation helpful? Give feedback.
This is not really possible. Although there exist hack as shown in issue #112
Example