Please nominate your Qt Champions for 2021!

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 a QLineEdit, next to the QWebEngineView and click into it, the Virtual Keyboard works as expected. Interestingly, if I clicked into the QLineEdit once, 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 within QWebEngineView, 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 QWebEngineView can be used. The only modification necessary is to paste the following line, before QApplication(...) is created:

    qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));

    I'm working on Fedora 25 with Wayland.



    Some further debugging in QVirtualKeyboardunveiled, that PlatformInputContext::setFocusObject() is not being called for Widgets rendered within QWebContentView, but why?

    I don't really know why, but since I compiled QWebEngine myself, it works!

Log in to reply