On Tuesday, 28 October 2025 18:57:42 Pacific Daylight Time Scott Bloom wrote:
> 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;

There's an incompatibility between the two things above:
1) the JS engine
2) the storage (Qt resources)

Node.js is an external application and thus does not understand Qt resources. 
If you want to use Node.js and modules for it, extract the files to disk and 
then run "node" using QProcess.

If you want to use QtQml's QJSEngine, you can load from Qt resources. But that 
is not Node.js, does not understand Node.js modules nor does it claim to be 
compatible with Node.js's JS language level or the TypeScript language, or any 
of the metadata/overhead that is usually associated with Node.js components. 
You can still run JavaScript, but you need to write code that QJSEngine can 
understand.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Principal Engineer - Intel Data Center Group

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Interest mailing list
[email protected]
https://lists.qt-project.org/listinfo/interest

Reply via email to