Versie 6.11 van Qt is uitgebracht. Qt, uitgesproken als cute, is een opensource- en platformonafhankelijke omgeving waarmee applicaties en grafische gebruikersinterfaces kunnen worden ontwikkeld. Het wordt onder andere gebruikt in Google Earth, KDE, Opera, Skype, VLC Media Player en VirtualBox. Meer informatie over deze release is hier te vinden. Dit zijn de release notes waarmee deze uitgave vergezeld gaat:
Performance & Productivity to 2D Rendering: Qt Canvas PainterThe release brings about a new, modern way of drawing 2D graphics with Qt: Qt Canvas Painter. It’s a new module with imperative 2D graphics rendering capabilities built on top of Qt’s Rendering Hardware Interface (RHI). The hardware acceleration provides notable performance gains for your UI graphics, with benchmarks showing significant speedups over the earlier module, QPainter’s OpenGL backend. Qt Canvas Painter closely follows the familiar HTML Canvas 2D context, making it fast and easy to start using it, and providing productivity from the start.
In addition to the performance and productivity uplifts, the new module adds some great advanced features to the table. These include adjustable antialiasing, box gradients and shadows, grid patterns, custom shader brushes, and color effects—supporting modern, visually rich UIs and efficient GPU‑driven drawing workflows
Improvements to One of the Best 3D FrameworksQt has evolved into offering the same 3D capabilities as a game engine but providing consistent, high performance. That means UIs with Qt Quick 3D run smoothly even with complex elements, effects, or animations.
New Real-Time Rendering Techniques: SSGI, SSR, and Motion VectorsWhere Qt 6.10 introduced improvements on lightmap baking, a technique used for how light interacts with static objects, the 6.11 release now introduces a dynamic alternative to it. SSGI (Screen Space Global Illumination) is a rendering technique for simulating how light bounces off surfaces on the screen as a post-processing effect, reacting to changes in real time. SSGI does come with some performance costs, though, suggesting going for lightmap baking for resource-constraint targets and SSGI rather for rich 3D UIs especially on less performance-sensitive applications.
Another real-time rendering technique new in 6.11 is the Screen Space Reflections (SSR). Similar to SSGI, it uses what’s visible on the screen but for rendering reflections, "raymarching" through each pixel and reflecting them correspondingly. For more:
- See Jonas’s blog on lightmap baking, SSGI and SSR
- Try it yourself with the Qt Quick 3D - SSGI Lightmap in Qt examples
Furthermore, through the SceneEnvironment and ExtendedSceneEnvironment types, Qt Quick 3D supports a variety of techniques for anti-aliased rendering of 3D objects. Temporal anti-aliasing and motion blur is particularly interesting for reducing jaggedness of moving objects. With Qt 6.11, we are adding the generation of per-object motion vectors, which provides an excellent balance of computational cost and fidelity of output.
Advanced Render-Pass CustomizationFor users that need to go beyond the default rendering pipeline because they require advanced visual effects, optimized performance, or integration of custom techniques, Qt Quick 3D now provides options to customize the render passes. New APIs for layers and tags make it possible to specify which items should be included in different parts of the render pipeline, direct them to different render targets, and give control over the individual render passes. Use existing materials, augment materials with additional shaders, or override aspects of materials. All this new flexibility is directly usable from QML. To see some more examples for what you can do with Qt Quick 3D in Qt 6.11, go here:
New Ways to Create and Interact with Graphs
- Antti’s blog about Rain and Snow effects with Qt Quick 3D Particles
- Sadegh’s blog on how to implement volumetric light shafts with real IES profiles
For graphs, here’s a new Qt example, the Wind Turbine Dashboard, showcasing how flexibly you can create and combine data visualizations from simple 2D presentations to complex 3D graphing. The graphs are also highly customizable, be it for their appearance, labels, or user interactions. Try it yourself: The Wind Turbine Dashboard is available in the Qt examples (make sure you’ve installed the Qt Graphs module).
In this new example, you see that 3D graphs now support multiple axis. Use different axis instances for the rowAxis, valueAxis, and columnAxis properties in QBar3DSeries, or for the axisX, axisY, and axisZ properties in QScatter3DSeries and QSurface3DSeries. We have added several new properties to the different elements in the Graphs module to give more control over how graphs are rendered, from overriding theme colors for individual axis and gradients in area graphs to line, stroke, and join styles in line graphs. Labels in Bar3DSeries can be customized and positioned more flexibly, QDateTimeAxis can take a time zone and allows panning and zooming, and properties such as QSplineSeries::optimized and GraphsItem3D.cutoffMargin allow further fine-tuning. And if that is not enough, then the new CustomSeries type allows the implementation of completely custom graphs where a user-defined delegate renders each data point.
A Declarative Approach to Asynchronous Coding: Qt TaskTreeQt TaskTree is a new module, available in Qt 6.11 as a technology preview. Qt TaskTree brings a completely new perspective to API design in Qt, introducing a declarative description approach to C++. An asynchronous workflow is expressed as a declarative description via a recipe, a re-usable object passed to a task tree, which then automatically manages the workflow accordingly. This clearly separates the workflow from the boilerplate code, making the code much more readable than traditional approaches. The task tree handles the tedious tasks for you, and you have even a complex workflow clearly and precisely described in one place.
In addition, Qt TaskTree resolves the issue of API incompatibilities, unifying various asynchronous APIs into a common interface, and allowing to adapt any asynchronous task to work with the module. Qt TaskTree is a big change, as it changes the way we think about writing and reading asynchronous code. For more information:
Other Notable Improvements
- See Jarek’s blog Introducing the Qt TaskTree Module,
- Visit the Qt TaskTree documentation,
- Try it out online in the Task Tree Demo.
Some of the other big improvements in the Qt 6.11 release include additions to the UI framework, easier connecting to web services and other connectivity improvements, and easier integration of QML and C++.
UI Framework and 2D AdditionsWe got a lot of great feedback on the work we put into improving the support for Lottie and SVG vector animations, and with Qt 6.11 we have continued that journey. We now support path and morphing animations, as well as matte layers, SVG masks, and SVG symbols. We respect the predefined subset of CSS animation timing functions, and the Lottie backend for the Qt Quick VectorImage module, as well as the lottietoqml tool, are now stable and out of tech preview. For our UI frameworks we added a much-asked-for DoubleSpinBox to Qt Quick Controls, added APIs to control default button handling in DialogButtonBox, and allow the corner radii of a RectangularShadow effect to be controlled independently.
For and from Qt Widgets users, we merged contributions that added a new StretchBanner option to QWizard, the possibility to tune the behavior of QAbstractItemView’s default keyboard search using the new keyboardSearchFlags, and the ability to control the visibility of the preview column in a QColumnView. Across both Qt Quick Controls and Qt Widgets, we have improved how accessibility clients can navigate UI elements and get notified about changes to roles and orientations.
Web and Connectivity ImprovementsFor Qt 6.11, we have continued to focus on the integration with web services. With the Qt OpenAPI module it becomes easy to generate Qt HTTP client code that uses Qt Networks RESTful APIs. The generator is a plugin into the OpenAPI Generator, so it consumes OpenAPI YAML specifications, is highly customizable, and integrates with the cmake build system. For more information:
- Read Tatiana’s blog about Support of OpenAPI in Qt 6
- Visit the Qt Open API documentation
- Try the ChatGPT RESTful API Client example
For Qt GRPC, we have added new mechanisms to control flow and content of requests and responses. The Qt HTTP Server module makes it easier to implement scalable servers, with several improvements that give control over limits, and the possibility to handle responses in worker threads. On the lowest level, the QNetworkRequest can now specify the TCP Keep Alive parameters for the current request, and by default, inactive connections are now automatically terminated after 2 minutes of inactivity.
Easier Integration of QML and C++The QML language server has learned where the C++ definition of a QML type is, making it easy to navigate between the two languages from the IDE. C++ code can find QML objects by ID, and can now easily traverse the hierarchy of QML contexts. Properties declared in C++ can be explicitly tagged as virtual and overrides to avoid accidental shadowing of properties.
Following up on its introduction in Qt 6.10, QRangeModel has gotten a companion class, QRangeModelAdapter, which provides a C++ API to modify the model data while speaking QAbstractItemModel protocol. For data where each row or item is backed by the same QObject subclass, QRangeModel can automatically connect each object’s property change notification to the dataChanged() signal to keep the UI up to date about data changes, without any additional code. This makes it even easier to make data from C++ backend code available to Qt Quick (or Widget) item views, without having to work with QAbstractItemModel APIs. For more information:
What Else Is New?
- Read Sami’s blogs about QML Language Server and linter additions
- Read my blog about QRangeModel updates and QRangeModelAdapter
The above highlights some of the big additions in Qt 6.11. In the What’s New in Qt 6.11 document you’ll find a lot of other things, such as new Qt Multimedia APIs for real-time audio processing. Developers targeting the Android platform will find it easier to call Java/Kotlin APIs from C++ and vice versa thanks to improvements in Qt Jenny, QtQuickView, and the ability to opt out of the default exception handling of QJniObject.
If you use qdoc for documenting your own APIs, you’ll find a long list of new commands that you can use especially for modern C++ using concepts. The improved rendering of modern C++ APIs to HTML makes it easier to read some of the template-heavy APIs in Qt.