Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-76931

Qt for WebAssembly: Qt Virtual keyboard does not load

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P2: Important P2: Important
    • None
    • 5.13.0
    • Virtual Keyboard
    • None
    • - Firefox 67.0.4
      - Chromium 75.0.3770.100
      - emscripten 1.38.32
      - Qt 5.13.0

      When trying to use the qt virtual keyboard in a WebAssembly project, it fails to load and crashes the application with the following error message:

      qrc:/qml/main.qml:47 Type InputWrapper unavailable qtloader.js:378:25
      qrc:/qml/+keyboard/InputWrapper.qml:4 Type InputPanel unavailable qtloader.js:378:25
      qrc:/QtQuick/VirtualKeyboard/content/InputPanel.qml:125 Type Keyboard unavailable qtloader.js:378:25
      qrc:/QtQuick/VirtualKeyboard/content/components/Keyboard.qml:36 module "QtQuick.VirtualKeyboard.Plugins" is not installed
      

      I verified that I actually load the plugin properly by running the same code on the host system as native application. But to be safe, here is what I did to ensure the plugin is loaded:

      • Add QT += virtualkeyboard and QTPLUGIN += qtvirtualkeyboardplugin to the pro-file
      • Add qputenv("QT_IM_MODULE", "qtvirtualkeyboard"); in the main before instanciating the QGuiApplication
      • I also tried setting it via JavaScript using the QtLoader. The value gets set correctly, but it does not change the error.
      • Import QtQuick.VirtualKeyboard 2.3 in the main QML file.

      I also attached the generated plugin import cpp files. As you can see there, all plugins are correctly referenced there

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            lpotter Lorn Potter
            SkyCoder Felix Barz
            Santtu Ahonen Santtu Ahonen
            Tor Arne Vestbø Tor Arne Vestbø
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes