That is an intesting question because it somehow pin points something
that is
not clear to me. Perusing the documentation, I saw that QQmlEngine
derives from
QJSengine. I cannot figure out which is best to employ in my use case:
scripting a QtWidgets C++ application. Can I use QML as a scripting
language in
a currently C++-only program ?
Sure, you can. QML, the language, is independent from any UI technology.
Most people use it with Qt Quick, but no one forces you to use Qt Quick.
When using widgets you'll have to do some more "boring" work yourself:
There is no pre-made QtWidgets QML module, but you can certainly
register the types you're interested in into your own modules using
QML_FOREIGN.
Mind that structured and constructible value types will only be
available from Qt 6.5 on. You can use the snapshot builds already for
prototyping, though.
best regards,
Ulf
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest