O'Reilly logo

Game Programming using Qt 5 Beginner's Guide - Second Edition by Lorenz Haas, Witold Wysota, Pavel Strakhov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

QML types, components, and documents

QML introduces some new concepts that you should be familiar with. A QML type is a concept similar to C++ class. Any value or object in QML should have some type and should be exposed to JavaScript code in a certain way. There are two major kinds of QML types:

  • Basic types are types that hold a concrete value and do not refer to any other objects, for example, string or point
  • Object types are types that can be used to create objects with certain functionality and consistent interface

Basic QML types are similar to C++ primitive types and data structures, such as QPoint. Object types are closer to widget classes, such as QLineEdit, but they are not necessarily tied to GUI.

There are numerous QML types ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required