Qml Text contain special characters



  • I try to create a Text in qml that include special characters such as:
    \r - carriage return
    \f - form feed
    \b - backspace
    ...

    but i get latin characters instead. my encoding is UTF- 8

    example:
    @Text {
    id: myText
    text: "Hello\rWorld"
    }@

    this create a latin character of r.
    what is wrong?



  • It's possible some of these are not supported by the Text element itself (\n, \t, ", ', \ should all work). I'd recommend adding a suggestion to http://bugreports.qt-project.org to have this looked into further.

    Regards,
    Michael



  • TextInput and TextEdit act different for other special characters.


Log in to reply