If I enter: "Subject:" + "/n" + vak + "/n" + klas as the text property of a Text element it returns everything in a straight line with "/n"'s in.
How can I get it to create new lines?
By default, Text will display the text as a single line unless it contains embedded newlines. To wrap the line, set the wrapMode property and give the text an explicit width for it to wrap to.
Text { text: "<b>Hello</b> <i>World!</ i>" } If height and width are not explicitly set, Text will attempt to determine how much room is needed and set it accordingly. Unless wrapMode is set, it will always prefer width to height (all text will be placed on a single line).
I don't know qt or qml, but in most languages the escape character is a backslash, not a regular slash, so the escape sequence would be \n
for a newline
Enter the text as "Hello \n World" it works
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With