[Interest] Qt scripting with JavaScript

Jason H jhihn at gmx.com
Thu Jun 18 18:49:23 CEST 2020

> Sent: Thursday, June 18, 2020 at 5:35 AM
> From: "Filippo Rusconi via Interest" <interest at qt-project.org>
> To: interest at qt-project.org
> Subject: [Interest] Qt scripting with JavaScript
> Greetings, Fellow Developers,
> Can I use the Qt QML module-contained QJSEngine for a classical QWidgets-based
> program ? If so, is the JS programming in this setting very different than what
> I am used to with Qt Script ?
> Script-wise, how about using Python to make my program scriptable? Is PySide
> something that would match the requirement? Has anybody tried both Qt Script and
> Python ? If so, what lessons were learnt ?

The problem with Python is the threading, as it still suffers from the GIL, but this can be avoided with care.

I used QtScript a long time ago, I did like it. I have used QML and I have to say that I love it.
I also used Riverbank's PyQt to make a scriptable widgets program by embedding/extending. I've only experimented with PySide and for what I was attempting, it did not cover all the classes I needed. This seems to be true quite a bit, that PySide lags PyQt.

That said, I would recommend QML first, PyQt second, and PySide third. If a detailed class analysis indicated that PySide covers the classes you need (and they work as they should), then you could skip PyQt. I do need to note that they are different products with different capabilities and licenses.

More information about the Interest mailing list