Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Qt Context Objects

This is a collection of available Qt objects that are a little hard to find in the QML documentation, but which are often useful.

The Qt QML Element

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.

JavaScript Elements

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.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded