Jump to Navigation

Beyond QML: Use your JS bindings!

Session Summary: 
A lot of application/platform developers already have JavaScript bindings for their software and are planning to write their UIs using QML. However QML does not offer, out of the box, a way to reuse your existing JavaScript bindings and this can become an issue as the developer would like to benefit from all those bindings. This session will guide the developer through the needed steps in order to enable the use of these bindings and will discuss the presented solution.
Session Abstract: 

While using QML in his application, the developer can use JavaScript libraries to extend the power of QML and write his own JavaScript code. The developer can also export C++ objects to QML if they are QObjects. These features bring great power to those that choose to use QML, but not being able to use non-QObject classes or not being able to use JavaScript bindings that were already written can become a serious "show-stopper" for some developers (as it reduces the reuse of already written code).

During this session I'll show step-by-step how to extend QML to enable the use of JavaScript bindings (allowing the use of non-QObject classes) . We will visit the QtScript API's and how QML uses it to enable the use of JavaScript and see in details what is needed to be changed to enable the use of bindings.

I'll also discuss the possible problems that can come with this solution.