[Solved] Display XML new line <br/>
-
Hello there,
I have difficulties displaying a text that I get from a XmlListModel in a zone (sent when clicked on a ListView Item).
The text appears without new lines.I basically do something like this:
@function changeDescription(newDesc)
{
descText.text = "<b>Description:</b> " + newDesc
}@I tried to change the textFormat or even replacing the "<br/>" with "<br>" as it works on another string (but using "\n" didn't improve either):
@ var newLineStr = newDesc.toString().replace("<br/>", "<br>")@When I'm looking at the string in console, the new lines appear.
Any help would be appreciated.
-
Little correction : when looking at the strings in console, new lines do not appear but if I copy-paste the content of the console and put it in an editor like Notepad++ they do appear as "CR LF".
Looks like it isn't as trivial as I thought if no one can help...
Should I report a bug, seems like I'm not the only one that encountered this issue :
http://www.qtcentre.org/threads/44314-a-way-to-display-xml-node-value-with-new-line-(-lt-br-gt-)EDIT : putting the text in the XML file in <![CDATA[ TEXT<br/>TEXT]]> worked