QT, How to focus on virtualkeyboard, and use keyboard to control virtualkeyboard

巧了我就是萌 提交于 2019-12-24 03:25:59

问题


I'm using virtualkeyboard of Qt5 on embedded device, and no mouse, the keyboard is not full pc keyboard, but just has eleven keys, which include up/down/left/right, enter, esc....

so I want focus on virtualkeyboard, and use up/down/left/right/enter to control virtualkeyboard, simulate mouse to click on virtual key.

how to do?


回答1:


There doc.qt.io/qt-5/qtvirtualkeyboard-build.html mentioned that qtvirtualkeyboard should be build with arrow-key-navigation option. Like this

qmake /path/to/qtvirtualkeyboard.pro CONFIG+=arrow-key-navigation

Also recommend to build examples/virtualkeyboard/basic/ with disable-desktop option and use it sources as example.



来源:https://stackoverflow.com/questions/43244762/qt-how-to-focus-on-virtualkeyboard-and-use-keyboard-to-control-virtualkeyboard

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