Virtual Keyboard behaviour in WebAssembly
-
For my application, compiled in WebAssembly, I need to manage the virtual keyboard on mobile device (i.e. smartphone or tablet).
I posted a similar question a few days ago with title "Virtual Keyboard and WebAssembly".
I'm studying the basiclayouts example compiled in webassembly.
In Chrome on a Motorola smartphone device, when I tap on Button 1, the keyboard appear.
Tap on Button 2 and the virtual keyboard still visible.
Tap on line edit and virtual keyboard still visible.
Tap on Button 1 and the virtual keyboard disappear.
Tap on Button 1 and the virtual keyboard don't showed.
Tap on line edit and the virtual keyboard appear again.
I don't understud when the virtual keyboard is showed and its behaviour.
When I tap on any button the virtual keyboard don't must showed.
The focus policy of bottons and line edit are set on StrongFocus.
The focus policy dialog is set on NoFocus.
Which signal/event are used to show/hide the virtual keyboard? -
Which version of Qt are you using? There are improvements for the wasm input context in 6.4, so the native virtual keyboard on mobile is working better.
-
@lorn-potter I use Qt 6.4.0-beta2 downloded with MaintenanceTool, with Emscripten 3.1.10
-
This post is deleted!
-
@nadimnadaf Why did you put your response here?
This is your thread, right? https://forum.qt.io/topic/138229/qt-5-8-0-which-module-is-used-to-show-a-webpage -
@Renio I have not tried Qt6. In Qt5, I have to use qml for virtual keyboard display. In mobile(Android), native keyboard is used. On Linux, Qt keyboard is applied. No issues like yours.
keyboard needs to be hidden when focus is false on a line edit or text input.