This is a collection of available Qt objects that are a little hard to find in the QML documentation, but which are often useful.
With the Qt element, the application can be quit, points and vector3d can be created and QML components can be created at runtime. Internally, the Felgo EntityManager component uses the Qt element to create entities dynamically. If you create components dynamically in your application, make sure to call GameWindow::loadItemWithCocos() for the dynamically created object, because otherwise the QML object would not be created for the faster cocos renderer.
In QML, the objects and functions of the ECMAScript specification ECMA-262 can be used. That means, all JavaScript functions and objects are
available from QML JavaScript code, including Array
, String
, Math
, Number
, Date
and JSON
.
See here for a complete reference of all available objects and their functions: http://doc.qt.io/qt-5/ecmascript.html.
A very good documentation about the functions of objects like Array, String, Math, Number or Date is available in the SELFHTML documentation: http://de.selfhtml.org/javascript/objekte/index.htm. However, this documentation is in German only.
Good resources for JavaScript programming in English are available at http://www.w3schools.com/jsref/default.asp and https://developer.mozilla.org/en-US/docs/JavaScript/Reference.
If you know other sources for documentation about these objects and functions, please contact us and we'll add it to this document.
As part of the free Business evaluation, we offer a free welcome call for companies, to talk about your requirements, and how the Felgo SDK & Services can help you. Just sign up and schedule your call.
Sign up now to start your free Business evaluation: