Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for WebAssembly
  4. External QML module files not found with WebAssembly but found with MSVC2019
Forum Updated to NodeBB v4.3 + New Features

External QML module files not found with WebAssembly but found with MSVC2019

Scheduled Pinned Locked Moved Solved Qt for WebAssembly
2 Posts 1 Posters 213 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Marko StankeM Offline
    Marko StankeM Offline
    Marko Stanke
    wrote on last edited by Marko Stanke
    #1

    The import itself seems to be fine. No issues at all, both on WebAssembly and MSVC2019.

    Example:

    import MyModule as MyModule
    MyModule.H1{}
    

    But the difference is that when running WebAssembly i'm getting the message: "MyModule.H1 is not a type".
    I'm not really sure what needs to be done differently with WebAssembly to access these qml files.

    Marko StankeM 1 Reply Last reply
    0
    • Marko StankeM Marko Stanke

      The import itself seems to be fine. No issues at all, both on WebAssembly and MSVC2019.

      Example:

      import MyModule as MyModule
      MyModule.H1{}
      

      But the difference is that when running WebAssembly i'm getting the message: "MyModule.H1 is not a type".
      I'm not really sure what needs to be done differently with WebAssembly to access these qml files.

      Marko StankeM Offline
      Marko StankeM Offline
      Marko Stanke
      wrote on last edited by
      #2

      @Marko-Stanke
      The issue was that I was missing the import path since in WebAssembly the pathing is a bit different.

      Adding:

      engine.addImportPath("qrc:/");
      

      solved the issue.

      1 Reply Last reply
      0
      • Marko StankeM Marko Stanke has marked this topic as solved on

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved