[Development] QML and JavaScript extensions

Rutledge Shawn Shawn.Rutledge at digia.com
Thu Nov 14 14:19:59 CET 2013

On 11 Nov 2013, at 9:38 AM, Topi Mäenpää wrote:
> Consequently, I have needed to hack my extensions by using hidden 
> low-level APIs. As mentioned, this was just a matter of finding a 
> pointer to the internal QScriptEngine in Qt4. In Qt5, I have used the V8 
> API directly. Now that 5.2 uses a new engine I need to rework my 
> extensions once again.
> Would it be possible to either fix the JS engine or, preferably, provide 
> a stable JavaScript extension API that could be used from QML?

It sounds like an interesting project.

I just wonder why you prefer "pure" Javascript over QML?  It's not so hard to expose C++ objects or classes to QML, depending on whether you want to use pre-created objects or create instances via QML declarations.  Are there some JS examples which demonstrate why this kind of code really needs to be procedural instead, perhaps to describe an order of doing things, as opposed to declaring objects which will then handle events from sensors or from users?

More information about the Development mailing list