0

当我的应用程序在葡萄牙语中运行时,我需要插入带有 É、ã 或 â 等重音的字符,但是当我尝试插入时(例如“a + ~”),它不会发生。

问题是因为我使用的是 Qt Virtual Keyboard 但我不知道如何避免它。

代码示例:

import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick.VirtualKeyboard 2.15
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.0

Window {
    id: window
    width: 640
    height: 480
    visible: true
    title: qsTr("Hello World")

    Column {
        id: cls
        anchors.fill: parent
        anchors.margins: 10
        spacing: 3

        Rectangle {
            id: frame
            width: parent.width
            height: 25
            border.color: green
            border.width: 1

            TextInput {
                id: txtInput
                anchors.fill: parent
                anchors.margins: 4
            }
        }
    }
}
4

0 回答 0