Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Qml Text contain special characters
Qt 6.11 is out! See what's new in the release blog

Qml Text contain special characters

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 5.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    goli
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mbrasser
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • G Offline
        G Offline
        goli
        wrote on last edited by
        #3

        TextInput and TextEdit act different for other special characters.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved