Laszlo is a senior software engineer at The Qt Company in Oslo, Norway. After years of UI framework development on various Nokia mobile platforms and a brief time of developing mobile GPUs at ARM, he is now working full time on Qt. His focus is on graphics, platform adaptation, windowing system integration and input device handling, in particular on embedded devices running Embedded Linux or Android. However, in a true cross-platform Qt spirit, he is not afraid of other systems either, and is often helping out with OpenGL support on Windows too. He is a major contributor to QtGui, QtQuick and the platform plugins. Laszlo holds a Bachelor's degree from the Jyvaskyla University of Applied Sciences and a Master's from the University of Debrecen.
As of today, the majority of OpenGL-based Qt applications that do not utilize Qt Quick are still using QGLWidget. While Qt 5.0 has started to offer more powerful and flexible solutions, these are often seen as cumbersome and limited, since interoperation with traditional, widget-based user interfaces is restricted. The same applies to Qt Quick applications: while QQuickWindow and QQuickView allow rendering a scene in a standalone native window, mixing the content with legacy widgets can be difficult and may involve unexpected issues. Finally, Qt 5's QtOpenGL module (the QGL classes) are inherently filled with issues and broken features since this component originates from the times of early Qt 4.x with a focus on OpenGL 1.x. The lack of a modern replacement for QGLWidget has made it impossible to properly deprecate this module so far. To overcome these limitations, QQuickWidget, QOpenGLWidget and QOpenGLWindow have been introduced. We will take a look at these exciting new classes and discuss which one is the most appropriate in various situations.
Even though these APIs are an enormous help in getting OpenGL content and Qt Quick scenes shown inside regular windows, those who were looking for a way to integrate Quick content with an external rendering engine (be it Qt-based or something else), found often that there is no easy solution for doing this in a hardware accelerated manner. This is changing with Qt 5.4, where the previously internal QQuickRenderControl is becoming a public API. This in effect allows redirecting the output of QQuickWindow into an OpenGL framebuffer object. The resulting texture can then be used in arbitrary ways. Together with the ability to adopt existing native rendering contexts, another new feature in Qt 5.4, this opens the door to use Qt Quick scenes in virtually any external rendering or game engine in new, creative and unforeseen ways. We will take a quick look at the new APIs and some examples.