QtScript vs QJSEngine, when to use this or that?

I need to run a series of javascript scripts in a C ++ application. Most of them are repetitive actions. Sample code here .

I know Qt, since version 5 contains 2 javascript engines: QtScript and QJSEngine.

My question is in what situations should we use one or the other? Which is better and in what situations?

+5
source share
1 answer

If you are set up for a new development and are not really dependent on any of them, you should definitely go with QJSEngine. There are a number of articles that you can find explaining the difference from a technical point of view, for example

I would suggest looking at thread also this one.

Currently, QtScript is a purely compatible part of Qt, does not have QML integration, and has not been updated / supported for quite some time in favor of the new engine.

+3
source

Source: https://habr.com/ru/post/1206977/


All Articles