Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Unicode in TextInput not showing



  • 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"
            }
        }
    }
    


  • This post is deleted!

Log in to reply