Virtual keyboard top black screen in Yocto

房东的猫 提交于 2021-02-11 14:00:59

问题


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.

enter image description here


回答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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!