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. Qt6.2.4 Text Cursor Display Issue
Qt 6.11 is out! See what's new in the release blog

Qt6.2.4 Text Cursor Display Issue

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 41 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.
  • K Offline
    K Offline
    Kirin20
    wrote last edited by Kirin20
    #1

    Hello everyone,

    I’m currently working on an application using Qt 6.2.4 + QML + Ubuntu 20.04 (aarch64). In my QML interface, I have a TextField and a SpinBox. I noticed that when these two components receive focus, the text cursor doesn’t show up. I was wondering why this might be happening.

    Could anyone please offer some insight? And if there’s a good way to resolve this, I would really appreciate your advice.

    Here is the code from my QML file:

    import QtQuick 2.12
    import QtQuick.Window 2.12
    import QtQuick.Controls 2.12
    import QtQuick.Layouts 1.15
    import QtQuick.VirtualKeyboard 2.1
    import QtQuick.VirtualKeyboard.Settings 2.1
    
    Window {
        id: root
        visible: true
        width: 1280
        height: 800
        visibility: Window.FullScreen
    
        MouseArea {
            anchors.fill: parent
            onClicked: forceActiveFocus()
        }
    
        Item {
            id: content
            anchors.fill: parent
    
            GridLayout {
                id: gridLayout
                width: 500
                rows: 2
                columns: 2
                rowSpacing: 5
                columnSpacing: 5
                anchors.left: parent.right
    
                Label {
                    text: "Dev Id"
                    horizontalAlignment: Text.AlignRight
                    verticalAlignment: Text.AlignVCenter
                    font.pointSize: 24
                }
                SpinBox {
                    Layout.fillWidth: true
                    font.pointSize: 24
                    inputMethodHints: Qt.ImhDigitsOnly
                    editable: true
                }
                Label {
                    text: "Led Ch Type"
                    horizontalAlignment: Text.AlignRight
                    verticalAlignment: Text.AlignVCenter
                    font.pointSize: 24
                }
                TextField {
                    font.pointSize: 24
                    inputMethodHints: Qt.ImhLowercaseOnly
                }
    
            }
    
        }
    
        InputPanel {
            id: keyboard
            y: Qt.inputMethod.visible ? parent.height - height : parent.height
            z: 99
            width: parent.width
            anchors.left: parent.left
            anchors.right: parent.right
            visible: Qt.inputMethod.visible
    
            externalLanguageSwitchEnabled: false
    
            Component.onCompleted: {
                VirtualKeyboardSettings.wordCandidateList.alwaysVisible = true
            }
        }
    }
    
    
    

    This is the startup script for my program:

    #!/bin/sh
    
    export LD_LIBRARY_PATH=/home/ido/smc2exe/libs:/opt/prefix/lib:$LD_LIBRARY_PATH
    export QT_QPA_PLATFORM_PLUGIN_PATH=/opt/prefix/plugins
    export QML2_IMPORT_PATH=/opt/prefix/qml
    export QT_FONTDIR=/usr/share/fonts/truetype/dejavu
    
    export QT_QPA_EGLFS_NO_LIBINPUT=1
    
    export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/event2
    
    export QT_LOGGING_RULES="qt.qpa.input=true"
    export QT_QPA_EGLFS_DEBUG=1
    
    exec gdbserver :10000 ./app -platform xcb
    
    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