这是我的问题,我想使用 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 上使用它时,它不会出现。有任何想法吗?