Working with Qt 3D using C++

While QML is a powerful and convenient way of using Qt 3D, sometimes you may have reasons to prefer C++ over QML. For example, if your project has a large C++ codebase or your team is not familiar with JavaScript, sticking with C++ might be the right solution. If you want to extend a Qt 3D class with your custom implementation, you'll have to use the C++ approach. Additionally, if you deal with large amounts of objects, processing them in C++ may be noticeably faster than doing that in QML. Qt allows you to choose between C++ and QML freely.

The QML API of Qt 3D for the most part consists of C++ classes exposed without many changes. That means that most of the code you've seen in this chapter so far can be transparently ...

Get Game Programming using Qt 5 Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.