QtScript vs QJSEngine when to use one or another?

2.3k views Asked by At

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

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

My question is in which situations should we use one or another? Which performs better and in which situations?

1

There are 1 answers

0
evilruff On

If you are up to a new development and not really depend yet on any of them you definitely should go with QJSEngine. There are number of articles you can find around explaining difference from technical side point of view, for example

I would suggest to have a look on this thread As well on this one.

Nowadays QtScript is a purely compatibility part of Qt, lacks QML integration as well as it's not updated/maintained already for quite a while in favour to a new engine.