---- On Thu, 21 Apr 2016 05:21:43 -0400 Ben Lau <[email protected]> wrote ----
>
>
> On 18 April 2016 at 23:38, Ian Geiser <[email protected]> wrote:
> ---- On Mon, 18 Apr 2016 11:06:59 -0400 Jason H <[email protected]> wrote ----
> >
> ttps://forum.qt.io/topic/52306/qt-5-5-qt-script-deprecated-what-is-replacement/12
> > >
> > > I saw this thread, but it did not seem to offer a clear detail other
> than to use QJSEngine and QJSValue directly. Specifically I use
> qScriptRegisterMetaType very heavy to add custom types. I know if I am
> using QML I can use qmlRegisterType<T>(uri, 1, 0, "T")
[...]
>
> Suggestion
> 1. Register a singleton QML component by C++.
> 2. The C++ component provides hook function (callback in Javascript)
> registration.
> void MyAPI::registerHook(QJSValue callback) {}
> 3. Whatever an event occur, call the hook function.
> QJSValueList args;QJSValue ret = callback.call(args);
>
Nice. I will give this a spin. I think this will work to convert the current
API into QML.
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest