O'Reilly logo

Game Programming using Qt 5 Beginner's Guide - Second Edition by Lorenz Haas, Witold Wysota, Pavel Strakhov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Combining OpenGL or Vulkan with Qt Widgets

Sometimes you want to combine the powers of accelerated graphics and Qt Widgets. While OpenGL and Vulkan are great for rendering high-performance 2D and 3D scenes, the Qt Widgets module is far easier to use for creating user interfaces. Qt offers a few ways to combine them into a single powerful interface. This can be useful if your application depends heavily on widgets (for example, the 3D view is only one of the views in your application and is controlled using a bunch of other widgets surrounding the main view).

The first way is the QWidget::createWindowContainer() function. It takes an arbitrary QWindow and creates a QWidget that keeps the window within its bounds. That widget can be put into ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required