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 Updated to NodeBB v4.3 + New Features

Unicode in TextInput not showing

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 282 Views 2 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.
  • T Offline
    T Offline
    t0m.n
    wrote on 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
    • MarkkyboyM Offline
      MarkkyboyM Offline
      Markkyboy
      wrote on last edited by Markkyboy
      #2
      This post is deleted!
      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