Integration with Qt Widgets and Qt Quick

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 ...

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.