For Qt, I have created a QRC file with the node modules, as well as the script.mjs

I would like to be able to do something along the lines of

QJSEngine engine;

engine.evaluate( “qrc:/js/script.mjs” )

You probably want to do this:

engine.importModule(":/js/script.mjs");

It will return a QJSValue of whatever the ECMAScript module in script.mjs evaluated to.

best regards,
Ulf Hermann
_______________________________________________
Interest mailing list
[email protected]
https://lists.qt-project.org/listinfo/interest

Reply via email to