What's New in Qt 6.8

New and Restored Modules in Qt 6.8

Qt 6.8 adds the following modules and tools:

  • The svgtoqml tool, used to generate QML code from SVG documents, is now out of tech preview. The tool supports a static subset of the SVG Tiny 1.2 profile.
  • The Qt Graphs, Qt HTTP Server, Qt Protobuf, and Qt GRPC modules are all promoted out of tech preview state.

Removed Modules in Qt 6.8

The following module(s) is deprecated. We strongly advise against using them in new code.

  • Qt 3D is deprecated. It remains part of the licensed software and is fully supported. It also remains part of the Qt Project and continues to be integrated with other modules for future releases. Critical bugs and security vulnerabilities will be addressed by the module maintainers at KDAB.
  • Regarding new features and functionality, users should contact KDAB by emailing info@kdab.com.

New Features in Qt 6.8

Qt Core Module

Qt Graphs Module

  • Qt Graphs is promoted out of tech preview.
  • The module is split into two submodules, QtGraphs and QtGraphsWidgets, to remove the requirement for including widgets into pure QML applications.

Qt GRPC Module

  • Qt GRPC is promoted out of tech preview.
  • Added streaming support to the GrpcQuick module.
  • Removed QGrpcInterceptor, QGrpcInterceptorManager and QGrpcInterceptorContinuation.
  • Added the writesDone() method to QGrpcClientStream and QGrpcBidirStream to half-close a stream from the client side.

Qt GUI Module

Qt Network Module

Qt Network Auth Module

  • Added QOAuthUriSchemeReplyHandler class, which handles private/custom and https URI scheme redirects (on supported platforms).
  • Added Proof of Key Code Exchange (PKCE) support to the QOAuth2AuthorizationCodeFlow class. PKCE is a recommended security measure to mitigate authorization code interception attacks.

Qt Positioning Module

  • The Qt Positioning Android backend can now provide altitude in MSL format on Android 14 and later.

Qt Protobuf Module

  • The Qt Protobuf module is promoted out of tech preview.

Qt Quick Module

  • Added font.contextFontMerging, which can be used to enable a new font merging algorithm that takes the full text into account when selecting fallback fonts. This may come at some more cost, but in certain cases it will give better results.
  • Added font.preferTypoLineMetrics property, which can be set to always prefer the typographical line metrics in OpenType fonts, even if the font does not manually set the USE_TYPO_METRICS flag.
  • Added the retainWhileLoading property to Image and BorderImage. When set to true on images that load asynchronously, the current image data will be retained until the new image is fully loaded. This can avoid flickering.
  • Added PlanarTransform, a utility object providing simple functions for specifying 2D transformation matrices.
  • Added PathRectangle, an optionally rounded rectangle path for Shape and PathView.
  • Added the Drag.imageSourceSize property to control the size of the image representing the data being dragged.
  • Added QQuickRenderTarget::depthTexture as a way to set a custom depth texture.
  • Added QQuickRenderTarget::Flag enumerator to allow specifying a view format when constructing through the named constructors.
  • TableView now has support for programmatically and interactively moving columns and rows.
  • All standard Qt Quick items and materials are made compatible with Multiview Rendering. This is utilized transparently to the applications when 2D content is embedded into an Qt Quick 3D XR scene and multiview rendering is enabled. Multiview rendering can improve rendering performance and decrease power consumption of AR/VR devices.
  • Creating multiview-compatible custom materials (QSGMaterial, QSGMaterialShader) is made possible via QSGMaterial::viewCount().
  • Added support for directing Qt Quick rendering into a 2D texture array with Multiview Rendering in QQuickRenderTarget. This is realized via new overloads of functions such as QQuickRenderTarget::fromVulkanImage(), and forms the foundation of multiview rendering support for XR applications built with Qt Quick 3D.
  • Added support for automatically performing multisample resolve at the end of a render pass in QQuickRenderTarget. Previously multisample rendering of redirected Qt Quick scenes was only possible by targeting multisample textures, leaving resolving up to the application or its shaders. When enabled, Qt Quick will now automatically create intermediate, multisample textures for use as a color buffer, performing the resolve into the application-provided non-multisample texture automatically. This allows making Qt Quick rendering target textures provided by an external engine, framework, or API (e.g., OpenXR) that only provides and consumes non-multisample textures.
  • Added support for setting a depth texture in QQuickRenderTarget. This allows specifying the application's own texture (or texture array, when using multiview rendering) where depth data is written, instead of using Qt's own intermediate buffers. Useful in particular when depth data must be written to a depth texture provided by an external engine, framework, or API (e.g., OpenXR).
  • Added support for specifying a texture view format in QQuickRenderTarget. This is specified via the viewFormat argument in the new overloads for QQuickRenderTarget::fromVulkanImage() and similar. This feature is provided specifically to allow dropping or adding the sRGB qualifier from or to the texture format, and is useful when having to work with textures provided by an external engine, framework, or XR compositor, where control over the texture format is not available, yet the 3D APIs' implicit linear->sRGB conversion on shader writes is not acceptable (e.g., because the Qt Quick 3D material pipeline already performs the same operation).
  • QQuickRenderTarget's internal management of intermediate buffers for depth/stencil and multisample color data has been redesigned. Calling QQuickWindow::setRenderTarget() no longer invalidates all internal temporary buffers, but rather attempts reuse as long as the size, format, and other parameters match. This is expected to lead to performance improvements in applications and libraries that have to pass in a different native texture to the QQuickWindow on every frame (e.g, because the texture comes from a buffer pool maintained by an external engine, framework, or XR compositor).

Qt Quick Shapes Module

  • Added the ShapePath.fillItem property. This can be used to take any texture provider item (such as layered items and images) and use them as fill for the shape.
  • Added the ShapePath.fillTransform property, which can be used to set an arbitrary transform on the shape's fill, whether it is an item or a gradient.

Qt Quick 3D Module

  • Technology Preview of XR support for Qt Quick 3D
    • Support for Head Mounted Displays (HMD) using OpenXR such as the Meta Quest 2 and 3.
    • Support for Apple Vision Pro.
    • Multi-view rendering (render both eyes in a single pass).
    • Spatial input support via hand tracking or controllers.
    • Support for spatial anchors.
  • Improved Shadow Rendering
    • Overall quality improvements.
    • Enhanced shadow debug tooling.
    • Cascading Shadow Maps.
    • Percentage-closer filtering (PCF) soft shadows.
  • PrincipledMaterial Enhancements
    • Additional parameters for adjusting Fresnel.
    • Support for property masking based on the vertex color attribute.
  • CustomMaterial: expose remaining properties from PrincipledMaterial.

Qt Quick VectorImage Module

  • Introduced the VectorImage: A component which can be used to render vector graphics directly Qt Quick with hardware acceleration and no pre-rasterization. It currently supports the SVG format (a static subset of the SVG Tiny 1.2 profile.)

Qt Shader Tools Module

  • Completed support for shaders compatible with multiview rendering. Added the MULTIVIEW keyword to the Qt Shader Tools Build System Integration.
  • Added depfile support for shaders processed at build time via qt_add_shaders(). Touching a file included via the #include directive in a shader will now trigger a recompilation of that shader file when building the project the next time.

Qt Sql Module

Qt Test Module

  • Added QTEST_THROW_ON_FAIL and QTEST_THROW_ON_SKIP C++ macros and environment variables that, when defined, change how QCOMPARE()/QVERIFY()/QSKIP() etc exit the test function on failure. Instead of a return, exiting only the immediately-surrounding function, they throw a special exception instead, thereby exiting from sub-functions of the test function, all the way to QtTestLib.
  • The QTRY_*_WITH_TIMEOUT macros now also accept chrono literals (was: int milliseconds).
  • QTest::failOnWarning() now has a no-parameter overload to support the common case of fail-on-any-warning, without needing to construct a match-everything regular expression.
  • QSignalSpy no longer inherits from QObject. If your code uses the fact that QSignalSpy is-a QObject, you need to redesign around this now.
  • The QSignalSpy::signal() method no longer necessarily returns an empty byte array when the connection failed. Use the existing isValid() method to determine whether a given QSignalSpy object listens to a valid signal on a valid object.
  • The QCOMPARE_xx macros can now only find QTest::toString() expansions that are either found via Argument Dependent Lookup on the type in question or are an instantiation of the QTest::toString<T>() template. This matches the behavior of the QCOMPARE() macro.

Qt WebEngine Module

Platform Changes

Desktop Platforms

Windows

  • Changed the font system to use DirectWrite as the default backend. This enables some modern features which were not available with the legacy GDI backend. The previous backend is still available and can be enabled by passing fontengine=gdi as parameter to the QPA plugin.

Wayland Client on Linux

  • Added a new window decoration style that is used on GNOME and uses similar styling as GNOME.
  • Modal status of dialogs is now forwarded to the compositor via the new xdg-dialog-v1 protocol.
  • Showing a window will now also request activation from the compositor (except when Qt::WA_ShowWithoutActivating is set).
  • Added support to qtwaylandscanner to send null for null QString.
  • Added options PUBLIC_CODE and PRIVATE_CODE to qt6_generate_wayland_protocol_client_sources that control the options that are passed to wayland-scanner.

Mobile Platforms

Android

  • Bumped the minimum supported version to Android 9.
  • Added support for build.gradle namespace property.
  • Added a CMake property QT_ANDROID_PACKAGE_NAME to set the package name.
  • Updated Gradle to 8.7 and AGP to 8.4.0.
  • Added support for building AAR library packages.
  • Deprecated the native Android backend in Qt Multimedia.
  • When opening libraries with QLibrary, JNI_OnLoad is no longer called by default.
  • QtQuickView and QML Embedding:
    • Added strong typing support for QtQuickView API.
    • Added API to manage QML Components, under this Java classes under QtQuickView were moved to own classes. This includes:
      • QtQuickView.SignalListener to QtSignalListener.
      • QtQuickView.StatusChangeListener to QtQmlStatusChangeListener.
      • QtQuickView Status to QtQmlStatus.
    • Added Java classes QtAbstractItemModel, QtAbstractListModel, and QtModelIndex, that wraps QAbstractItemModel, QAbstractListModel, and QModelIndex, respectively.
    • Added support for QML embedding from a Service.

visionOS

  • Qt, and Qt applications can now be built for visionOS.

Embedded Platforms

List of API Changes

These pages contain an overview of API changes in Qt 6.8:

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.