- Qt 6.12
- What's new in Qt 6
- What's New in Qt 6.7
- Qt 6.12.0 Reference Documentation

# What's New in Qt 6.7

## New Features in Qt 6.7

### Qt Core Module

- Added QSpan, Qt's reimplementation of C++20 std::span.
- Added Qt::strong_ordering, Qt::weak_ordering, and Qt::partial_ordering classes that are a C++17-compatible implementation of `std::*_ordering` classes.
- Added helper macros to conveniently implement relational operators in Qt classes. These macros provide operator<=>() in C++20 builds, and fall back to all six relational operators in C++17 builds.
- Applied these helper macros to QDate, QTime, QDateTime, QTimeZone, and qfloat16 classes.
- Added new class QAtomicScopedValueRollback.
- Added Qt::Key_micro to eventually replace the misnamed Key_mu: it is the micro sign U+00B5, not the Greek letter mu, U+03BC or U+039C.
- QLocale's name(), bcp47Name() and uiLanguages() now let callers specify the separator to use between tags in names.
- QLocale now localizes (in so far as it can) the time zone parts of formatted datetimes.
- Date (and datetime) parsing of two-digit years now allows the caller to control the century within which those years are selected.
- QCalendar now has a matchCenturyToWeekday(), to support the parsing of two-digit years.
- QDateTime now accepts TransitionResolution parameters, allowing callers control over how time-zone transitions are resolved. The default resolution of a datetime in a gap is now valid but its time() and possibly date() now match what toMSecsSinceEpoch() reports, rather than what was asked for.

### Qt D-Bus Module

- The deprecated <qdbusmacros.h> header got removed. Use <qtdbusglobal.h> instead.
- The new function QDBusAbstractInterface::setInteractiveAuthorizationAllowed() allows to set the `ALLOW_INTERACTIVE_AUTHORIZATION` flag for asynchronous calls.

### Qt Graphs Module

#### Qt Graphs3D

- Data api doesn't require creating every data item into heap memory.
- Added render to image functionality.

#### Qt Graphs2D

- Technology Preview of 2D graphs.
- Contains initial support for bar, line and scatter graphs.

### Qt GRPC Module

- Added the functionality to use interceptors for customizing the behavior of QtGRPC calls and streams. Now you can subclass QGrpcClientInterceptor and override the desired interception methods.
- Introduced QGrpcServerStream, QGrpcClientStream and QGrpcBidirStream classes. Those are used to allow making client, server and bidirectional streaming calls respectively.

Note: The Qt GRPC Module is under Technology Preview.

### Qt GUI Module

- Added QIconEngine implementations that provide access to the native icon libraries on Windows 10 and 11, macOS and iOS, and Android.
- Added a new event types QEvent::ChildWindowAdded and QEvent::ChildWindowRemoved, with a corresponding QChildWindowEvent class to inform windows when child windows are added and removed.
- Enabled loading variable application fonts on all platforms (requires DirectWrite or FreeType backend on Windows.)
- QFont got new APIs to work with variable fonts.
- The new QFont::Tag type can be used to specify axis with the new variable font support APIs, and with the support for typographical features that was introduced as a preliminary API in Qt 6.6 and is now finalized.

### Qt Multimedia Module

- The FFmpeg multimedia backend now links dynamically with FFmpeg on Windows. Prebuilt FFmpeg binaries are provided through the online installer. Windows applications that use the FFmpeg backend must now bundle FFmpeg binaries as part of their installer using windeployqt.
- The new MediaPlayer::autoPlay and Video::autoPlay properties can be used to automatically start playback when a media source has been set.
- The QCameraDevice has a new correctionAngle property. This property represents the rotation angle needed to compensate for the physical camera rotation of the camera compared to its native orientation.

### Qt Network Module

- Added QHttpHeaders class to represent HTTP headers.
- Added std::chrono support for setting transfer timeouts with QNetworkRequest and QNetworkAccessManager.
- Added QNetworkRequestFactory class (Technology Preview). The class is a convenience class for creating network requests.
- Added QRestAccessManager and QRestReply (Technology Preview). The classes are convenience wrappers tuned for RESTful use cases.

### Qt OPC UA Module

- Added the new QOpcUaHistoryEvent and QOpcUaHistoryReadEventRequest classes to enable reading of historical events.
- Added the new QOpcUaGenericStructHandler class and related data classes to support decoding and encoding of generic OPC UA structures.

### Qt Protobuf Module

- Added the new serializer that implements JSON serialization and deserialization functionality for QProtobufMessage-based classes.
- Added support of 'optional' fields in the Qt Protobuf generator. If the message field is marked as 'optional', it gets clear<fieldName> and has<fieldName> methods in addition to the regular field one.
- Enum fields generated by the Qt Protobuf generator now preserve the case of first letter. Previosly generator capitalized the generated enum field names.

Note: The Qt Protobuf Module is under Technology Preview.

### Qt QML Module

- Added new features to QML Language Server: formatting, semantic and code snippet completions, renaming usages, and setting file generation in CMake via QT_QML_GENERATE_QMLLS_INI.
- The translation context of a QML file can be set via `pragma Translator`
- You can now declare QML_CONSTRUCTIBLE_VALUE and QML_STRUCTURED_VALUE on value types and construct objects of such types from QML. In fact you could already since Qt 6.5, but now it's officially supported.

#### Qt Quick Compiler

- Bindings and functions that write properties of value types can now be compiled to C++
- Optional chaining can now be compiled to C++
- for..in iteration can now be compiled to C++

### Qt Quick Module

- Added the TextEdit.textDocument.source property for loading from a file, save() and saveAs() functions for writing. These are intended to replace XMLHttpRequest in text-handling use cases.
- Added cursorSelection property to TextEdit and TextArea to inspect and modify properties of the selected text.
- Updated the Text Editor example to demonstrate these features.
- Added new text renderer which will give better results for rendering very large text. It can be selected by setting renderType to `Text.CurveRendering`.
- Text classes got new APIs to work with variable fonts.
- Rectangle can now have different radii on each corner.
- Added preliminary support for embedding QWindows into the Qt Quick scene, along with a parent property on Window, to allow setting a visual parent of a Window.
- The focusReason and focusPolicy properties of Control were moved to Item.
- Added QQuickRhiItem as a modern alternative to QQuickFramebufferObject. This allows creating custom QQuickItem objects that render 3D graphics via any hardware accelerated graphics API supported by Qt's rendering hardware interface, i.e. OpenGL, Vulkan, Direct3D, or Metal.
- Added a new QQuickRenderControl example that uses QRhi and is thus fully portable and works with all the supported 3D APIs. This shows how to redirect the Qt Quick content into a texture in a cross-platform manner.

### Qt Quick Controls Module

- Added the following functions that take strongly-typed arguments:
  - pushItem()
  - pushItems()
  - popToItem()
  - popToIndex()
  - popCurrentItem()
  - replaceCurrentItem()
- Unlike the push, pop and replace functions, these can be compiled to C++ by the QML Compiler.

### Qt Quick Shapes Module

- The Curve Renderer and the associated property preferredRendererType are now officially supported and are no longer considered experimental.
- Added pathHints property for characterizing shapes. This may be used by the renderer to optimize processing and rendering the paths.
- Shapes now have an implicit size based on the bounding rect of the shape, and will be appropriately positioned in layouts. The properties fillMode, horizontalAlignment and verticalAlignment were added to modify how the shape behaves when the item is given an explicit size which differs from the implicit size.
- The tool svgtoqml was added as a technology preview. This is a tool which can be used to convert an SVG file into QML code. It is currently considered experimental and has support for a subset of what Qt SVG supports.

### Qt Quick Timeline Module

- The QtQuick.Timeline.BlendTrees sub-module adds new APIs to enable blending multiple timeline animations.

### Qt Quick 3D Module

- QQuick3DRenderExtension is a new class for implementing application side rendering extensions, meaning users now can extend QtQuick3Ds rendering pipeline without doing modifications to QtQuick3Ds engine. Together with the new semi-public API provided by QtQuick3D, and the Qt Rendering Hardware Interface (QRhi), custom rendering code can now be inserted into QtQuick3D's rendering pipeline, either to be rendered as part of the main render pass, or as a standalone render recording. Results from standalone render recordings can be made available to preceding extensions, which can be controlled by the order the extensions are declared. Standalone Render Extensions can also be exposed as texture providers for Texture items, meaning their result can be used with other QtQuick3D types that consumes QtQuick3D's Texture type, like materials, effects etc.
- The QSSG family of classes are documented and are offered as APIs with limited compatibility promises. The Qt Spatial Scene Graph classes provides access, and useful helpers to interact with QtQuick3D's internal types. The QSSG classes can be divided into two main groups. The first group provides access to state necessary to do custom rendering into the QtQuick3D scene with QRhi, while the second group of classes provides access to QtQuick3D's renderables, and helpers that makes it possible to modify, take, or re-render those renderables using the same infrastructure used by QtQuick3D internally.
  - QSSGRenderExtension - Backend implementation for Render Extensions.
  - QSSGRenderContextInterface - Aggregate class of the sub-systems used internally by QtQuick3D.
  - QSSGRhiContext, QSSGRhiGraphicsPipelineState, QSSGRhiSamplerDescription - QRhi convenience class used By QtQuick3D.
  - QSSGFrameData - Per frame data used by render extensions.
  - QSSGRenderHelpers, QSSGModelHelpers, QSSGCameraHelpers, and QSSGRenderExtensionHelpers - Helper classes to access, set-up and render QtQuick3D renderables.
- CustomMaterial got new sourceAlphaBlend and destinationAlphaBlend properties.
- Texture got new textureProvider and tilingModeDepth properties.
- View3D got new explicitTextureWidth, explicitTextureHeight, and effectiveTextureSize properties.

### Qt Quick 3D Physics Module

- HeightFieldShape: Support using QML Image type as source through the image property.
- ConvexMeshShape: Support using QQuick3DGeometry as source through the geometry property.
- TriangleMeshShape: Support using QQuick3DGeometry as source through the geometry property.
- PhysicsWorld:
  - Add reportKinematicKinematicCollisions and reportStaticKinematicCollisions properties that will enable kinematic-kinematic and static-kinematic collision reporting respectively.
  - Support setting simulation thread count.
- PhysicsNode: Add support for collision filtering. It is now possible to specify groups IDs for nodes and ignore collisions between them.
- PhysicsBody: Add support for disabling simulation of a body through the simulationEnabled property.

### Qt Serial Bus Module

- Added a method to QCanDbcFileParser, which enables DBC file parsing with an encoding other than UTF-8.

### Qt Sql Module

- The deprecated <qsql.h> header got removed. Use <qtsqlglobal.h> instead.

### Qt WebEngine Module

- Added new APIs QWebEngineWebAuthUXRequest and QML type WebEngineWebAuthUXRequest to support FIDO2 user verification and resident credential.
- Added new api QWebEngineDesktopMediaRequest to enable source selection for desktop screen capturing.
- Added WebEngineDriver to automate the testing of web sites across browsers. WebEngineDriver is based on ChromeDriver.
- Added QWebEngineUrlRequestInfo::requestBody to access the body of a request using the QIODevice API.
- Added settings forceDarkMode (QML) and ForceDarkMode (C++) to enable automatically rendering all web contents using a dark theme.
- Added signals QWebEngineProfile::clearHttpCacheCompleted and QQuickWebEngineProfile::clearHttpCacheCompleted.

### Qt Widgets Module

- Added a QRhiWidget class (under technology preview) for rendering 3D graphics via any hardware accelerated graphics API supported by Qt's rendering hardware interface, i.e. OpenGL, Vulkan, Direct3D, or Metal.
- QCheckBox got a new signal checkStateChanged that emits the new check state as a type safe Qt::CheckState enum value.
- QDateTimeEdit got a new timeZone property
- On Systems running Windows 11 and above the new Windows 11 widget style is used by default. This style supports Windows dark mode.

### Qt SVG Module

- Added support for some elements from SVG 1.1 standard. The elements are Mask, Symbol, Marker, Pattern, Filter, and Filter Primitives (feMerge, feColorMatrix, feGaussianBlur, feOffset, feComposite, feFlood)
- Added QtSvg::Options flag to enable or disable rendering of the new elements.
- Added setters and getters for the QtSvg::Options for QSvgRenderer and QSvgWidget. The new features are enabled by default.

## Tools

### Qt Widgets Designer

- Qt Widgets Designer now writes fully qualified enumeration values to the `.ui` files in order to support scoped enumerations and Qt for Python. Support for reading these values has been back-ported to 6.6.1 and 6.5.4.

## Platform Changes

### Desktop Platforms

#### Windows

- Added Windows 11 style
- Added QNativeInterface::QWindowsScreen that provides access to underlying handle of a QScreen on Windows.

#### macOS

- macOS 14 is now a supported build and target platform.

#### Wayland Client on Linux

- Added QNativeInterface::QWaylandScreen that provides access to underlying wayland object of a QScreen.

#### WebAssembly

- Added drop support (drag-and-drop). Qt will now send drop events when the user drops content on application windows.
- OpenGL ES 3 / WebGL2 is now default, with fallback to OpenGL ES2 / WebGL 1.
- Emscripten version updated to 3.1.50

### Mobile Platforms

#### Android

- Re-factored the Android plugin Java code which, consists of:
  - Simplifying the architecture and the relation between the various classes (for example, between QtActivity, QtActivityLoader, and QtActivityDelegate).
  - Moving the QtLoader classes away from the public bindings package.
  - Removed usage of reflection.
- Added preliminary support for child windows for Android to be consistent with Qt and its other QPAs. As a result of that, QScreen::grabWindow() is temporarily unsupported for now.
- Set Android 14 as the maximum supported platform version, and the default platform SDK and target levels to API 34.
- Set the supported Android NDK version to r26b (26.1.10909125) and JDK to 17.
- Aligned the Mobile category examples with iOS.
- Added QNativeInterface::QAndroidScreen that provides access to the Android Display id of a QScreen.
- Added support for using ndk-stack with androidtestrunner to pretty print test crash reports.
- Added CMake variable QT_ANDROID_DEPLOYMENT_TYPE to explicitly set the deployment type for the Android package.
- Overall re-write and update for Qt for Android platform documentation.
- Introduced features to use the powers of Qt in Android projects:
  - QtQuickView to use Qt Quick in Java or Kotlin code (technology preview).
  - Qt Tools for Android Studio for Android Studio (technology preview).

#### iOS

- iOS 17 is now a supported target platform.

### Embedded Platforms

#### Boot to Qt

- Support was added for Yocto 4.3 (Nanbield).
- Support added for ARM Linux development hosts.
- Squish support included in the target images.
- The Support Levels for Target Hardware was updated with new supported boards for Tier 3:
  - Amazon AWS EC2 ARM64
  - NVIDIA Jetson AGX Orin Developer Kit
  - NXP i.MX8M Nano LPDDR4 EVK (replaces DDR4 EVK variant)
  - Qualcomm Robotics RB5 Development Kit
  - TI SK-AM69

#### VxWorks

- Added VxWorks 23.09 support as Technology Preview.

## Build System Changes

- Qt C++ headers now feature metadata for the IWYU tool.
- CMake: You can now tweak the arguments for *deployqt tools in qt_generate_deploy_app_script(), qt_deploy_runtime_dependencies() by setting the DEPLOY_TOOL_OPTIONS.
- CMake: qt_add_library() now considers the value of the BUILD_SHARED_LIBS variable. If the variable is defined, it has higher priority than the library type detecting logic in qt_add_library() when adding the library targets.
- CMake: qt_standard_project_setup() allows you now to set the native UI language of your application, as well as the languages the UI is translated to. This is then picked up by qt_add_translations() calls to generate .ts and .qm files that match the given languages, generating a 'plural-only' .ts file for the native language.
- CMake: You can now pass multiple targets to qt_add_translations() to extract translations from. Alternatively, you can let qt_add_translations() collect all targets of a project (done via the new qt_collect_translation_source_targets() function), with the option to opt out of undesired targets on directory or target level.
- CMake: qt_add_translations() has been moved out of technology preview.

#### WebOS

- Qt 6.7 has been verified to work with LG webOS OSE 2.25.0 (Qt for webOS).

## List of API Changes

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

- New Classes and Functions in Qt 6.7
- Obsolete Classes