Replies: 2 comments 2 replies
-
So instead I wrote it as |
Beta Was this translation helpful? Give feedback.
1 reply
-
The (this is mentioned there: https://slint.dev/releases/1.4.1/docs/slint/src/language/syntax/types#strings ) |
Beta Was this translation helpful? Give feedback.
1 reply
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 used the template to create a slint project. That has a slint file and a main.rs file. The default code has a text element that displays an incremented counter variable.
Text { text: "Counter: {root.counter}"; }
Obviously it works.
I thought it would be interestng to write it with a single main.rs file that has a slint! macro section. So in the style of the memory game tutorial.
The above code fails compilation because of the backslash. So escape that and it compiles. But the app displays as "Counter: {root.counter}". No backslashes gives same without a backslash.
If I code it as
Text {
// text: "Counter: \{root.counter}";
text: root.counter;
}
then compiles and I get a number displayed in the app.
What am I utterly misunderstanding here?
Beta Was this translation helpful? Give feedback.
All reactions