Virtual Keyboard not showing on WebEngineView with Touchscreen only (no mouse) on XCB
-
Hi Qt community,
I am running a Qt/QML application on Ubuntu using X server (xcb platform) with a USB touchscreen. My setup includes:
-
xserver.service launching a minimal X server
-
myapp.service launching my Qt/QML app with Environment=QT_QPA_PLATFORM=xcb and os.environ["QT_IM_MODULE"] = "qtvirtualkeyboard" in Python
QML includes a WebEngineView and an InputPanel
The problem:
-
On app startup, touching a WebEngineView input field (e.g., YouTube search) does not trigger the virtual keyboard.
-
If I connect a mouse, click anywhere, then remove the mouse, touchscreen input works and the virtual keyboard shows.
It seems that XCB waits for an initial mouse interaction to activate the virtual keyboard. I want a permanent solution so that touchscreen interaction alone always triggers the keyboard, without any mouse.
Has anyone faced this issue or knows how to force the virtual keyboard to show on touch events in XCB without relying on a mouse click?
Any suggestions or workarounds are highly appreciated.
-