External QML module files not found with WebAssembly but found with MSVC2019
Solved
Qt for WebAssembly
-
wrote on 4 Jul 2023, 13:13 last edited by Marko Stanke 7 Apr 2023, 13:16
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. -
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.wrote on 4 Jul 2023, 14:20 last edited by@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.
-
2/2