QWebEngineView not working with QVirtualKeyboard
-
Hey everyone,
Im trying to use the Virtual Keyboard on a website, rendered within a
QWebEngineView, but the keyboard does not pop up if I click into a text field. If I place aQLineEdit, next to theQWebEngineViewand click into it, the Virtual Keyboard works as expected. Interestingly, if I clicked into theQLineEditonce, it starts also popping up, when clicking into the text field on the web page, but it still does not receive any key strokes. Somehow I can not belief, that the Virtual Keyboard is not working withinQWebEngineView, since this seems a rather common use case to me.Did I miss something? Does someone else see this problem?
To reproduce, any example using
QWebEngineViewcan be used. The only modification necessary is to paste the following line, beforeQApplication(...) is created:qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));I'm working on Fedora 25 with Wayland.
Thanks,
Pascal--
Update1:
Some further debugging inQVirtualKeyboardunveiled, thatPlatformInputContext::setFocusObject()is not being called for Widgets rendered withinQWebContentView, but why?Update2:
I don't really know why, but since I compiled QWebEngine myself, it works!