April 2018
Beginner
714 pages
18h 21m
English
Let's see how we can recreate our first Qt 3D scene using only C++ code. Our scene will contain a light source, a cube, and a first person camera controller. You can use the Qt Console Application template to create the project. Don't forget to enable the Qt 3D modules you want to use in the project file:
QT += 3dextrasCONFIG += c++11
The first change compared to the QML approach is that you need to use the Qt3DWindow class instead of Qt3DQuickWindow. The Qt3DWindow class performs a few actions that are typically needed in a Qt 3D application. It sets up a QForwardRenderer, a camera, and initializes the QInputSettings object needed for processing events. You can access the default frame graph ...
Read now
Unlock full access