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 translated to the equivalent C++ code with minimal effort. When you elect not to use QML, you lose its property bindings...