While Qt 3D is a very powerful module, sometimes it's not enough to make a complete game or application. Other Qt modules such as Qt Quick or Qt Widgets can be very helpful, for example, when working on the user interface of your game. Luckily, Qt provides a few ways to use different modules together.
When it comes to Qt Widgets, your best bet is the QWidget::createWindowContainer()
function. It allows you to surround your 3D view with widgets and display them all in a single window. This approach was already discussed in Chapter 9, OpenGL and Vulkan in Qt Applications, and can be applied to Qt 3D without any changes.
However, the capabilities of Qt Widgets are still limited in the world of hardware-accelerated graphics. Qt Quick is much more promising in this area, and the synergy between QML APIs of Qt Quick and Qt 3D can prove to...