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

wasm cannot load qmldir

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.8.0 Beta3
    • None
    • WebAssembly

    Description

      Hi,

      I am trying to load a module like:

       

      QML_IMPORT_NAME = MyModule
      QML_IMPORT_MAJOR_VERSION = 1
      
      SOURCES += \
          main.cpp
      
      HEADERS += \
          filesystemmodel.h
      
      qml_resources.files = \
          qmldir \
          Main.qml \
          MyType.qml
      
      qml_resources.prefix = /qt/qml/MyModule
      
      RESOURCES += qml_resources 

       https://www.qt.io/blog/whats-new-for-qml-modules-in-6.5

       

       

      Windows and Android are working fine, however wasm cannot find the module. I tried to add import path but engine.loadFromModule() still fails. If I use QQmlApplicationEngine::load() with the path qrc:/qt/qml/MyModule/Main.qml it works.

      This seems related to https://bugreports.qt.io/browse/QTBUG-102595

      Attachments

        1. issue_wasm.zip
          5 kB
          Regis Duflaut

        Issue Links

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

          Activity

            People

              sorvig Morten Sørvig
              reg31 Regis Duflaut
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes