Qml Newline Text

If I enter: "Subject:" + "/ n" + vak + "/ n" + klas as the text property of the Text element, it returns everything in a straight line using "/ n".

How can I create it to create new lines?

+4
source share
2 answers

I don’t know qt or qml, but in most languages ​​the escape character is a backslash, not an ordinary slash, so the escape sequence will be \n for a new line

+5
source

Enter the text as "Hello \ n World" it works

+1
source

Source: https://habr.com/ru/post/1413316/


All Articles