- Qt 6.8
- What's new in Qt 6
- What's New in Qt 6.2
- Qt 6.8.3 Reference Documentation

# What's New in Qt 6.2

## New and Restored Modules in Qt 6.2

Qt 6.2 adds the following module:

- QtQuick.Dialogs - A QML module that provides native dialogs with a Qt Quick fallback on platforms where Qt does not provide a native one. FileDialog and FontDialog are available in this release.

Qt 6.2 reintroduces the following modules that were not present in Qt 6.1. All listed modules were ported to Qt 6 and the CMake build system.

A more detailed list of changes to each module can be found in Changes to Qt Modules in Qt 6.

- Qt Bluetooth
  - BlueZ 4 support was removed.
  - Win32 backend was removed. As a consequence, there is no longer support for Qt Bluetooth using Mingw-w64.
  - The QML API was removed.
  - QBluetoothTransferManager and related classes were removed.
  - Functionality related to pairing agents was removed from QBluetoothLocalDevice.
- Qt Multimedia
  - Qt Multimedia public API consists of five large functional blocks. Each API has undergone significant changes compared to Qt 5:
    - Device discovery
    - Low level audio
    - Playback and decoding
    - Capture and recording
    - Video output pipeline
  - Currently supported backends:
    - Linux: GStreamer
    - Windows: WMF
    - macOS/iOS: AVFoundation
    - Android: MediaPlayer and Camera APIs
- Qt NFC
  - Removed support for Linux/NearD.
  - Added support for iOS.
- Qt Positioning
  - Many of the properties were made bindable.
  - Renamed QGeoPolygon::path() to QGeoPolygon::perimeter.
  - QGeoLocation now uses QGeoShape instead of QGeoRectangle as a bounding area.
  - The `error()` signal in multiple positioning classes was renamed to `errorOccurred()`.
  - QGeoPositionInfoSourceFactoryV2 was removed, and QGeoPositionInfoSourceFactory now supports custom parameters for the created objects.
  - NMEA support was redesigned. The serialnmea plugin was renamed to nmea and now supports reading the input stream from a TCP socket or a raw file. The `nmeaSource` property was removed.
- Qt Remote Objects
  - The local connection backend now supports abstract namespaces (this is a Linux-specific extension), achieved by using the new `localabstract` schema in the URL.
  - `.rep`-files now support:
    - Class enums.
    - QFlags.
    - Multiline comments (C-style).
  - Enums and flags are now supported in POD-types and as keys for QMap and QHash properties in `.rep` files.
- Qt Sensors
  - Most QML facing properties are now bindable.
  - Sensor::type and QSensor::type properties are now marked as constant.
  - Added parameter to QSensorBackend::sensorBusy() to be able to also clear the busy state.
  - Deleted typedef for qtimestamp.
  - Renamed sensor `type` string to `sensorType`.
  - Windows: We can now require Windows 10 API, thereby extending the number of sensors supported.
  - TI Sensor Tag as supported platform has been removed.
  - The Linux `sysfs` backend has been removed.
  - The sensor gesture support has been removed (input welcomed here: QTBUG-97066).
  - Sensorfw as a platform was removed due to Sensorfw itself not yet ported to Qt 6.
  - Sensor types that had only Sensorfw backend (IRProximity, Lid, and Tap) are not listed as supported anymore.
  - Sensor types without any backend have been removed (Altimeter, Distance, and Holster).
- Qt Serial Bus
  - QCanBusFactory was removed and QCanBusFactoryV2 was renamed to QCanBusFactory.
  - QModbusRtuSerialSlave and QModbusRtuSerialMaster were renamed to QModbusRtuSerialServer and QModbusRtuSerialClient.
- Qt Serial Port
- Qt WebChannel
  - QWebChannel properties were made bindable.
  - The property update interval of QWebChannel can now be configured. 50ms update interval remains the default.
  - QWebChannel now supports property updates for BINDABLE properties. However, the client side does not provide a generic callback mechanism if the host property does not have a NOTIFY signal.
  - Signals from objects living in a different thread are now handled correctly (QTBUG-51366).
- Qt WebEngine
  - The submodule for Qt Quick has been renamed from QtWebEngine to QtWebEngineQuick.
  - Several classes were moved from QtWebEngineWidgets to QtWebEngineCore, including QWebEnginePage.
  - Some functionality previously only accessible by deriving from QWebEnginePage are now accessible using synchronous signals.
  - Favicon API added to QWebEngineProfile to look up icons for specific URLs.
  - The new QWebEngineLoadingInfo class provides more detail about loading success or failure.
- Qt WebSockets
- Qt WebView

## New Features in Qt 6.2

### Qt Core Module

- Added functionality:
  - Added QByteArrayView::compare().
  - Added methods QFlags::test(Any)Flag(s).
  - Added QHashSeed to control hashing (seeds are now size_t); this shall replace qGlobalQHashSeed and qSetGlobalQHashSeed.
  - Added PRIxQTDATATYPE macros to facilitate printf()-style formatting without casts or warnings.
- Made many properties bindable.
- Grapheme clusters can now handle emojis.
- UNC paths and network shares on Windows are now handled consistently.
- The handling of the start-offset parameter, called `from`, in various `indexOf()` and `lastIndexOf()` methods of containers (principally QString, QByteArray and their views) is now more coherent.
- Like QString::number() has since the release of Qt 6.0, QByteArray::number()'s overloads for signed integral types now return a text with a minus sign followed by the number's absolute value instead of coercing to an unsigned type for all bases except ten, when passed a negative integer and any supported base.
- QCalendar now supports construction from the ID of a custom backend.
- QChar, QPoint, and QPointF are now primitive rather than merely relocatable.
- QCoreApplication::exit() is now, like quit(), a slot (as the documentation long claimed); same for QEventLoop and QThread.
- QDateTime now takes account of time-zones throughout time_t's range (in so far as the platform supplies such information), rather than artificially limiting the range to 1970 - 2037.
- Fleshed out the value-type behavior of QFlags, and it is now used more systematically.
- When building for C++20, QList (hence also QVector) is now a `contiguous_iterator`, satisfying `contiguous_range`.
- QLocalSocket::waitFor*() methods were made to support duplex operations on Windows (as they already did on Unix).
- Added std::chrono overloads to QLockFile methods, avoiding needless conversions between UTC and local time.
- QString can now be built from char8_t (when available).
- Made QThreadPool's thread priority configurable; the threads share the pool's name if it has one.
- Lots of Bug-fixing, clean up, and documentation improvements.

### Qt GUI Module

- Added floating point image formats to QImage for both 16-bit and 32-bit floats.
- Converting RGB images to, or painting RGB colors onto, gray-scale images is now gamma corrected and produces the luminance values of the input color space.
- The CSS text-decoration-color attribute is now supported in rich text spans with underlines, overlines, and strikethrough.

### Qt Quick Module

- Added support for selecting cells in a TableView by assigning it a ItemSelectionModel.

### Qt Quick Controls Module

- Added a new control; SelectionRectangle. This control can be used to select cells in a TableView by using a styled selection rectangle.

### Qt Widgets Module

- Added PM_LineEditIconSize, a new QStyle::PixelMetric enum value that allows styles to define a default size for icons in a QLineEdit.
- The new QGraphicsSceneEvent::timestamp method returns the timestamp of the original event, if applicable.
- QGraphicsSceneWheelEvent::phase, QGraphicsSceneWheelEvent::pixelDelta, and QGraphicsSceneWheelEvent::isInverted return the respective attributes of the original QWheelEvent.

### Qt Network Module

- QSslSocket
  - TLS backends that were previously (in Qt 6.1) converted into plugin-like classes, were moved out of QtNetwork and implemented as real plugins.
  - Several TLS backends may now co-exist at runtime, for example, OpenSSL and Schannel, or OpenSSL and SecureTransport.
- QNetworkInformation
  - Introduced isBehindCaptivePortal, a new property that can be used to determine whether the user is connected to a network with a captive portal.

### Qt QML Module

- Core language
  - Added support for optional chaining.
  - Added as casts: these mostly help tooling but can also be used to replace code such as `return (obj instanceof Item) ? obj.width : 42` with `(obj as Item)?.width ?? 42`.
- Added a public CMake API for QML modules: `qt_add_qml_module()`.
  - Takes care of generating `qmldir` and `qmltypes`.
  - Can automatically create a plugin if a plugin only registers types.
  - Has built-in support for a linting target.
- QML tooling
  - `qmllint`
    - Added a granular setting for the warning severity; warnings can be disabled entirely, make them informational only, or make them lead to a non-zero exit code.
    - Added a settings file (.qmllint.ini) for configuring warning levels on a directory-by-directory basis. A default settings file can be generated using `qmllint --write-defaults`.
    - Warnings can now be disabled in blocks via comments; `//qmllint enable/disable <warning-type1> <warning-type2...>`
    - Greatly improved performance when linting files, especially when linting multiple files with lots of imports.
    - Added support for JSON output for use in tooling.
  - `qmlformat`
    - `qmlformat` now utilizes our new qmldom library and should generally produce better output.

### Qt Quick 3D Module

- Added support for instanced rendering, an optimized way of drawing multiple instances of the same objects with different transformations.
- Added 3D Particles, an API for adding particle effects to 3D scenes. This includes a technology preview of model blend particles.
- Added Qt Quick Input events for 2D items in 3D, both in scene and in textures.
- Added an API for ray-based picking from arbitrary points in the scene.
- Added RuntimeLoader, making it possible to load glTF2 files at runtime.
- Implemented parallax occlusion mapping: Enables the use of height maps without the cost of adding geometry.
- Implemented depth draw mode on materials: Enables fine control over depth rendering for a material.

### Qt Data Visualization Module

- Fixed background rendering mode.
- RenderDirectToBackground_NoClear was deprecated as opting to not clear the window is no longer an option in Qt 6.
- Lots of minor bug fixes.

### Qt Charts Module

- Added more marker shapes to pick from in QScatterSeries and QLegend.
- Added a light marker feature to QXYSeries and QLegend. This is a lighter weight rendering of points.
- Added an ability to select points in a series via method calls to QXYSeries and QBarSet.
- Added an ability to set a color or use a custom light marker to be used for selected points in QXYSeries.
- Added an ability to set a color to be used for selected bars in QBarSet.
- Added a feature to display a best fit line in a QXYSeries.
- Added an ability to customize the look of individual points in a QXYSeries. This feature allows setting the visibility, label visibility, and the size of each point.
- Added a method sizeBy() to QXYSeries that adjusts the size of the points in a series according to passed values.
- Added a method colorBy() to QXYSeries that adjusts color of the points in a series according to passed values and a gradient.
- Added a new axis class QColorAxis to support the colorBy() feature, displaying a color scale.
- Added an ability to disable label truncation in axes.
- Improved performance by caching recently used text bounds.
- Added interactive support to QLegend via a setInteractive() method. Once enabled, allows the legend to be detached with a double-click. Once detached, the legend can be dragged and resized, and reattached to a side of the chart by dragging it off the edge.
- Added attachedToChartChanged() signal to QLegend.
- Updated the legend example.

### Qt for Python

- New examples, tutorials, and videos added to the Qt for Python documentation.
- Compatible with Python 3.10rc2.
- Added the QtDBus, QtNetworkAuth, and QtBluetooth modules.
- Added a new Shiboken feature, Opaque Containers, to avoid copying C++ containers into Python to use them.
- You can now use `qtpaths` instead of `qmake` when building PySide from source.
- Added support for std::function for some of QThreadPool's methods.
- Added new QML functions as well as support for qmlRegisterSingletonInstance.

## Platform Changes

### Technology Preview Platforms

#### Windows on ARM

- Added Windows on ARM64 as a technology preview platform.
- Supported as a build target; no host support yet.
- Known limitations:
  - No support for Qt WebEngine yet; missing official support for Chromium.
  - No support for SSL yet; missing official OpenSSL support.

### Desktop Platforms

#### macOS on Apple Silicon

- Added official support as both a target and a host platform.
- Libraries in the Qt SDK are built as universal binaries.
- Known limitations:
  - SSL support is missing.
  - postgresql and odbc database plugins are missing (QTBUG-93204).
  - JIT support is missing (QTBUG-93206).

#### Wayland Client on Linux

- A touchpad pinch gesture now generates Zoom and Rotate QNativeGestureEvents if the compositor sends them via the pointer-gestures-unstable-v1 protocol. This allows a Qt Quick PinchHandler to operate via touchpad pinch gestures. Two, three, or four-finger gestures are recognized. A gesture of type Qt::PanNativeGesture can be generated by swiping with three or four fingers. Two-finger flicking still generates QWheelEvents as before.

### Mobile Platforms

#### Android

- Some of the methods previously under the QtAndroid namespace in QtAndroidExtras (for example, sdkVersion() and context()), were moved to QNativeInterface::QAndroidApplication.
- Implemented a new permissions API in QCoreApplication.
- The remaining QtAndroidExtras APIs were left as private APIs in qtbase until cross-platform alternatives (for Intents, Services, etc.) are in place.
- Removed obsolete Ministro code as it's now unsupported by Android.
- Simplified AndroidManifest.xml to only contain tags relevant to the user, helping maintainability and reducing clutter.
- QCDebug() and friends now use the category as a tag in Android logcat.
- Updated Android Gradle plugin to 4.1.3.
- Fixed a non-SDK API bug with style (QTBUG-71590), though Android Style for widgets on Android 9+ is still affected (QTBUG-96149).
- The default targetSdkVersion is set to 30 in accordance with Google Play Store requirements.
- The build-tools version and platform version used is bumped to 30.
- QDesktopServices custom handlers are now enabled, and allow you to work with Android App Links, for example.
- Added information that allow applications to determine the source of an intent without creating an own extension of QtActivity.
- Fixed imports for QML modules and added the possibility of multiple QML root paths.
- Fixed Vulkan builds on Android.

#### iOS

- Improved CMake support.
- Known issues:
  - Missing default launch screen storyboard.
  - Custom libraries fail to install (QTBUG-95381).

### Embedded Platforms

Available under the Qt for Device Creation license.

#### Boot to Qt

- The Boot to Qt stack was updated to use Yocto 3.3 (Hardknott).
- Added Intel NUC10 (64bit i5 x86) as a reference target.
- Added NVidia Jetson Tegra X2 as a target.

#### QNX

- Added QNX version 7.1 and Ubuntu 20.04 as a host.
- Added NXP iMX8QM as a reference target.

#### INTEGRITY

- Added INTEGRITY version 19.0.13 and Ubuntu 20.04 as a host.
- Added Qualcomm Snapdragon 8155P as a reference target.

#### WebOS

Qt 6.2 has been verified to work with LG webOS OSE 2.13.1 using Ubuntu 20.04 as development host and Raspberry Pi4 hardware.

## List of API Changes

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

- New Classes and Functions in Qt 6.2
- Obsolete Classes