Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QtScript vs QJSEngine when to use one or another?

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?

like image 874
RandomGuy Avatar asked Nov 16 '14 13:11

RandomGuy


1 Answers

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.

like image 86
evilruff Avatar answered Nov 07 '22 02:11

evilruff