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. Unicode in TextInput not showing
Forum Update on Monday, May 27th 2025

Unicode in TextInput not showing

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 241 Views
  • 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.
  • T Offline
    T Offline
    t0m.n
    wrote on 26 Feb 2020, 07:13 last edited by t0m.n
    #1

    Hi!
    Running the following code, the Unicode char \u0003 only shows in the Text but not in the TextInput. Using a TextField instead of a TextInput also doesn't work.
    Any hints on what I'm missing here?

    This is Qt 5.12.5 on a raspberry Pi3.

    Thanks!

    import QtQuick 2.12
    import QtQuick.Window 2.12
    import QtQuick.Layouts 1.12
    
    Window {
        visible: true
        width: 640
        height: 480
    
        FontLoader { id: testfont; source: "qrc:/testfont.otf" }
    
        RowLayout {
            anchors.fill: parent
    
            TextInput {
                font.family: testfont.name
                font.pixelSize: 36
                color: "black"
                text: "\u0003" + "Test"
            }
    
            Text {
                font.family: testfont.name
                font.pixelSize: 36
                color: "black"
                text: "\u0003" + "Test"
            }
        }
    }
    
    1 Reply Last reply
    0
    • M Offline
      M Offline
      Markkyboy
      wrote on 2 Mar 2020, 15:47 last edited by Markkyboy 3 Feb 2020, 15:49
      #2
      This post is deleted!
      1 Reply Last reply
      0

      1/2

      26 Feb 2020, 07:13

      • Login

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