[Interest] Handling Qt Virtual Keyboard key presses with a custom implementation

Luca Carlon carlon.luca at gmail.com
Sat Jul 21 13:48:33 CEST 2018


Hello!
Would it be possible to somehow use the Qt Virtual Keyboard alone, without
additional elements, handling the pressed keys with a custom implementation
in C++/QML?
I partially succeeded by creating an invisible TextInput element and
installing an event filter in qApp. But still I need a focused TextInput,
which is a problem in my case.
By reading the docs I suspect that a custom InputMethod may be what I'm
looking for:
http://doc.qt.io/qt-5/technical-guide.html#implementing-a-custom-input-method,
It is not completely clear to me, however, how to actually use it and how
to set it as the global input method for the keyboard. It would be even
better if it was possible to do it in C++, but I'm not even sure of how to
use QInputMethod.
Can someone provide a few info about how to use the Qt Virtual Keyboard
without other elements, handling the pressed keys with a custom
implementation in QML or even better in C++?
Thank you!

Luca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180721/06e6a72f/attachment.html>


More information about the Interest mailing list