QtvirtualKeyboard没有显示在应用程序中

时间:2019-04-18 03:43:57

标签: qt qml qt5 qtvirtualkeyboard

这是我的问题,我要使用qt虚拟键盘。我可以在桌面上运行它,但是在我的raspberrypi3(运行最小根文件系统)上却没有弹出。

我放了

qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));

在main.cpp

并将InputPanel放入main.qml

import QtQuick 2
import QtQuick.VirtualKeyboard 2.1

Item {
    id: root
    Item {
        id: appContainer
        anchors.left: parent.left
        anchors.top: parent.top
        anchors.right: parent.right
        anchors.bottom: inputPanel.top
        //...
    }

    InputPanel {
        id: inputPanel;
        y: parent.height; // position the top of the keyboard to the bottom of the screen/display

        anchors.left: parent.left;
        anchors.right: parent.right;
        Component.onCompleted: {
            inputPanel.keyboard.style.languagePopupListEnabled = false;
        }
        states: State {
            name: "visible";
            when: inputPanel.active;
            PropertyChanges {
                target: inputPanel;
                // position the top of the keyboard to the bottom of the text input field
                y: parent.height - inputPanel.height;
            }
        }
    }
}

当我尝试在rp3上使用它时,它不会出现。有什么想法吗?

0 个答案:

没有答案