[Interest] QJSEngine with QRC
Ulf Hermann
ulf.hermann at qt.io
Wed Oct 29 11:38:04 CET 2025
> 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
More information about the Interest
mailing list