[Interest] Replacement for Qt Script

Jason H jhihn at gmx.com
Mon Apr 18 19:17:00 CEST 2016

>  > 
>  > If MyStruct is just a JS object, then just use JS. function MyStruct(){ return {"x": 100, "y": 100}; }; var myStruct = new MyStruct();
>  > You only need createObject when you are creating an object defined in C++ or dynamic object from QML.
> That is my rub here.  These are custom QML components that are being created in JS and then passed back into the C++ end of things.  The goal being I want to be able to write "plugins" for my app using JS instead of C++. So I am creating and manipulating custom types that are then used to manipulate and extend the C++.  I may be making this harder than it needs to be though.  I will give it a try with the non-gui QML components and see how far I get.

Well, the QML/C++ gets you parenting, and signals/slots. If your plugin system doesn't have that, then there's nothing to worry about.

I'm not sure which version of JS the V8 engine implements, but there is proper class support in Javascript now, so that might do inheritance if that's what you need.

More information about the Interest mailing list