QT, How to focus on virtualkeyboard, and use keybo

2019-07-20 05:02发布

问题:

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.