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 (online link here), 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.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
create apps
create games
cross platform
native performance
3rd party services
game network
level editor
easiest to learn
biggest time saving
best support