问题
I am developing a device using VAR-SOM-MX7 developing in Yocto Sumo. I managed to add virtual keyboard into my QApplication but when the keyboard appeared, it overlaps the application. The textEdit field still getting the input from the virtual keyboard but just cannot show the textEdit field while typing.
I have tried to:
qputenv("QMLSCENE_DEVICE", QByteArray("softwarecontext"))
CONFIG += disable-desktop
In qml I changed the keyboard layout:
keyboardBackground: Rectangle {
color: "transparent"
}
But still I am getting black screen on top overlapping my application.
回答1:
After long try, I finally found a solution to solve this issue. The virtual keyboard was created using another QQuickWindow and this window overlap my QWidget application window. I just have to find the vk window, and use the QWindow setMask function to mask of the black region.
Hope this can help others too since I couldn't find any other solution online on this matter.
来源:https://stackoverflow.com/questions/61608431/virtual-keyboard-top-black-screen-in-yocto