New Features in Qt 6.2: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
(Fix formatting for Qt Sensors)
 
(29 intermediate revisions by 18 users not shown)
Line 1: Line 1:
[[Category:Release]]
[[Category:Release]]
[[Category:Developing Qt::Qt6]]
[[Category:Developing Qt::Qt6]]
NOTE: DRAFT / WORK IN PROGRESS
 
See also https://doc.qt.io/qt-6/whatsnew62.html


==New & Restored Modules==
==New & Restored Modules==


New modules:
The following additional modules are available, that were not present in 6.1:
 
;Qt Bluetooth
 
:*The Qt Bluetooth module has been ported to Qt 6 and the CMake build system
:*BlueZ 4 support was removed.
:*Win32 backend was removed. As consequence there is no more QtBluetooth with MinGW.
:*The QML interface/API was removed.
:*QBluetoothTransferManager and related classes were removed.
:*API elements in QBluetoothLocalDevice related to pairing agents were removed.
:*Many more API changes were done. For details check out the porting guide.
 
;Qt Multimedia
:*The Qt Multimedia module has been ported to Qt 6 and the CMake build system with major refactoring of the functionality.
:*Public API of Qt Multimedia consists of 5 large functionality blocks with the APIs inside those blocks have undergone significant changes compared to Qt 5:
:**Device discovery
:**Low level audio
:**Playback and decoding
:**Capture and recording
:**Video output pipeline
:*The currently supported set of backends is:
:**Linux, using GStreamer
:**macOS and iOS using AVFoundation
:**Windows using WMF
:**Android using the MediaPlayer and Camera Java APIs
 
;Qt NFC
:*The Qt NFC module has been ported to Qt 6 and the CMake build system.
:*iOS support was added and Linux/NearD support was removed.
 
;Qt Positioning
:*The Qt Positioning module has been ported to Qt 6 and the CMake build system.
:*Many of the properties are now bindable.
:*Rename QGeoPolygon::path() to QGeoPolygon::perimeter.
:*QGeoLocation now uses QGeoShape instead of QGeoRectangle as a bounding area.
:*The error() signal in multiple positioning classes is renamed to errorOccurred().
:*QGeoPositionInfoSourceFactoryV2 is removed, and QGeoPositionInfoSourceFactory now supports custom parameters for the created objects.
:*NMEA support is redesigned. The serialnmea plugin is renamed to '''nmea''' and now supports reading the input stream from a TCP socket or a raw file. The ''nmeaSource'' property is removed.
 
;Qt RemoteObjects
:*The Qt RemoteObjects module has been ported to Qt 6 and the CMake build system.
:*The local connection backend now supports abstract namespaces (this is a Linux-specific extension), achieved by using the new '<code>localabstract</code>' schema in the URL.
:*Class enums and [https://doc.qt.io/qt-6/qflags.html flags] are now supported in .rep files.
:*Enums/flags are now supported inside POD types and as keys for QMap/QHash properties in .rep files.
:*Multiline comments (wrapped inside '/*' and '*/') are now supported in .rep files.
 
;QtQuick Dialogs
:*Provides native dialogs with Qt Quick fallbacks for platforms where Qt does not have native dialogs.
:*Currently FileDialog and FontDialog are available, with more to be added in future versions.


*Added QtQuick.Dialogs module. This provides native dialogs with Qt Quick fallbacks for platforms where Qt does not have native dialogs. Currently FileDialog and FontDialog are available, with more to be added in future versions.
;Qt Sensors
:*The Qt Sensors module has been ported to Qt 6 and the CMake build system.
:*Most QML facing properties are now bindable
:*Sensor::type and and QSensor::type properties 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 (MSVC) builds supported (Windows RT in Qt 5)
:*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 is not enabled yet (requires Qt 6 support first)
:*Sensor types that had only sensorfw backend are not listed as supported (IRProximity, Lid, and Tap)
:*Sensor types without any backend have been removed (Altimeter, Distance, and Holster)


The following additional modules are available, that were not present in 6.1:
;Qt SerialBus
:*The Qt SerialBus module has been ported to Qt 6 and the CMake build system.
:*The QCanBusFactory has been removed and QCanBusFactoryV2 was renamed to QCanBusFactory.
:*QModbusRtuSerialSlave and QModbusRtuSerialMaster have been renamed to QModbusRtuSerialServer and QModbusRtuSerialClient and the new names shall be used in new code.


*Qt Bluetooth
;Qt Serialport
*Qt Multimedia
:*The Qt SerialPort module has been ported to Qt 6 and the CMake build system.
*Qt NFC
*Qt Positioning
**The Qt Positioning module has been ported to Qt 6 and the CMake build system.
**Many of the properties are now bindable.
**Rename QGeoPolygon::path() to QGeoPolygon::perimeter.
**QGeoLocation now uses QGeoShape instead of QGeoRectangle as a bounding area.
**The error() signal in multiple positioning classes is renamed to errorOccurred().
**QGeoPositionInfoSourceFactoryV2 is removed, and QGeoPositionInfoSourceFactory now supports custom parameters for the created objects.
**NMEA support is redesigned. The serialnmea plugin is renamed to '''nmea''' and now supports reading the input stream from a TCP socket or a raw file. The ''nmeaSource'' property is removed.
*Qt RemoteObjects
**The Qt RemoteObjects module has been ported to Qt 6 and the CMake build system.


*Qt Sensors
;Qt WebChannel
*Qt SerialBus
:*The Qt WebChannel module has been ported to Qt 6 and the CMake build system.
**The Qt SerialBus module has been ported to Qt 6 and the CMake build system.
**The QCanBusFactory has been removed and QCanBusFactoryV2 was renamed to QCanBusFactory.
**QModbusRtuSerialSlave and QModbusRtuSerialMaster have been renamed to QModbusRtuSerialServer and QModbusRtuSerialClient and the new names shall be used in new code.


*Qt Serialport
:*QWebChannel properties are now bindable.
:*The property update interval of QWebChannel can be configured. It still defaults to 50ms.
:*QWebChannel 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 WebChannel
;Qt WebEngine
**The Qt WebChannel module has been ported to Qt 6 and the CMake build system.
:*The Qt WebEngine module has been ported to Qt 6 and the CMake build system.
**QWebChannel properties are now bindable.
:*The Qt WebEngine submodule for Qt Quick has been renamed from QtWebEngine to QtWebEngineQuick
**The property update interval of QWebChannel can be configured. It still defaults to 50ms.
:*Several classes have been moved from QtWebEngineWidgets to QtWebEngineCore including QWebEnginePage
**QWebChannel 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.
:*Some functionality previously only accessible by deriving from QWebEnginePage can now be accessed using synchronous signals.
**Signals from objects living in a different thread are now handled correctly (QTBUG-51366)
:*Favicon API added to QWebEngineProfile to lookup icons for specific urls.
:*New QWebEngineLoadingInfo class for more details about loading success/failure.


*Qt WebEngine
;Qt WebSockets
**The Qt WebEngine module has been ported to Qt 6 and the CMake build system.
:*The Qt WebSockets module has been ported to Qt 6 and the CMake build system.
**The Qt WebEngine submodule for Qt Quick has been renamed from QtWebEngine to QtWebEngineQuick
**Several classes have been moved from QtWebEngineWidgets to QtWebEngineCore including QWebEnginePage
**Some functionality previously only accessible by deriving from QWebEnginePage can now be accessed using synchronous signals.


*Qt WebSockets
;Qt WebView
**The Qt WebSockets module has been ported to Qt 6 and the CMake build system.
:*The Qt WebView module has been ported to Qt 6 and the CMake build system.
*Qt WebView
**The Qt WebView module has been ported to Qt 6 and the CMake build system.


==New Features (within existing modules)==
==New Features (within existing modules)==


===QtCore===
===Qt Core===


*Added
*Added
Line 60: Line 110:
**QHashSeed, to control hashing (seeds are now size_t); this shall replace qGlobalQHashSeed and qSetGlobalQHashSeed.
**QHashSeed, to control hashing (seeds are now size_t); this shall replace qGlobalQHashSeed and qSetGlobalQHashSeed.
**PRIxQTDATATYPE macros to facilitate printf()-style formatting without casts or warnings.
**PRIxQTDATATYPE macros to facilitate printf()-style formatting without casts or warnings.
**A permissions API to QCoreApplication (for things like access to camera, file system, network on devices).
**<s>A permissions API to QCoreApplication (for things like access to camera, file system, network on devices).</s> Delayed, the API is private for now.
*Many properties are now bindable.
*Many properties are now bindable.
*Grapheme clusters can now handle emojis.
*Grapheme clusters can now handle emojis.
*UNC paths and network shares on Windows are now handled consistently.
*UNC paths and network shares on Windows are now handled consistently.
*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 (see QTBUG-91736, QTBUG-94215).
*QByteArray::number()'s overloads for signed integral types, when passed a negative integer and any supported base now (like QString::number() since 6.0) return a text using minus sign followed by the number's absolute value, instead of coercing to an unsigned type for all bases except ten.
*QCalendar now supports construction from the ID of a custom backend.
*QCalendar now supports construction from the ID of a custom backend.
*QChar, QPoint and QPointF are now primitive, rather than merely relocatable.
*QChar, QPoint and QPointF are now primitive, rather than merely relocatable.
Line 77: Line 129:
&hellip; and there's been lots of tidy-up, bug-fixing and improvements to documentation.
&hellip; and there's been lots of tidy-up, bug-fixing and improvements to documentation.


===QtGui===
===Qt Gui===


*Floating point image formats added to QImage for both 16-bit and 32-bit floats.
*Floating point image formats added to QImage for both 16-bit and 32-bit floats.
*Converting RGB images to, or painting RGB colors onto, grayscale images is now gamma corrected and produces in the luminance values of the input color space.
*Converting RGB images to, or painting RGB colors onto, grayscale images is now gamma corrected and produces in 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.


===QtQuick===
===Qt Quick===


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


===QtQuickControls===
===Qt Quick Controls===


*New control added: SelectionRectangle. This control can be used to select cells in a TableView by using a styled selection rectangle.
*New control added: SelectionRectangle. This control can be used to select cells in a TableView by using a styled selection rectangle.


===QtWidgets===
===Qt Widgets===


===QtNetwork===
*PM_LineEditIconSize is a new QStyle::PixelMetric enum value that allows styles to define the default size of icons in a QLineEdit
*QGraphicsSceneEvent::timestamp is a new method that returns the timestamp of the original event, if applicable
*QGraphicsSceneWheelEvent::phase, ::pixelDelta, and ::isInverted return the respective attributes of the original QWheelEvent
 
===Qt Network===


*QSslSocket
*QSslSocket
Line 100: Line 157:
**Introduced isBehindCaptivePortal, a new property that can be used to see if the user is connected to a network with a captive portal.
**Introduced isBehindCaptivePortal, a new property that can be used to see if the user is connected to a network with a captive portal.


===QtQml===
===Qt Qml===


*Core language
*Core language
Line 119: Line 176:
***qmlformat now utilizes our new qmldom library and should generally produce better output because of it
***qmlformat now utilizes our new qmldom library and should generally produce better output because of it


===QtQuick3D===
===Qt Quick 3D===


*Instanced Rendering, an optimized way of drawing multiple instances of the same objects with different transformations.
*Instanced Rendering, an optimized way of drawing multiple instances of the same objects with different transformations.
Line 130: Line 187:
*Depth Draw Mode on materials: Enables fine control over if and when depth rendering takes place for a material.
*Depth Draw Mode on materials: Enables fine control over if and when depth rendering takes place for a material.


===QtDataVisualization===
===Qt DataVisualization===


*Background rendering mode fixed.
*Background rendering mode fixed.
Line 136: Line 193:
*Lots of minor bug fixes.
*Lots of minor bug fixes.


===QtCharts===
===Qt Charts===


*More marker shapes are available to pick from in QScatterSeries and QLegend.
*More marker shapes are available to pick from in QScatterSeries and QLegend.
Line 153: Line 210:
*Added attachedToChartChanged signal to QLegend.
*Added attachedToChartChanged signal to QLegend.
*Updated legend example.
*Updated legend example.
===Qt for Python===
*New examples, tutorials, and videos were added
  https://doc.qt.io/qtforpython-6/
*Even if it's not released yet, we are compatible with Python 3.10rc2
*The modules QtDBus, QtNetworkAuth, and QtBluetooth were added.
*Shiboken has now a new feature called Opaque Containers, to avoid
  copying C++ containers into Python to use them.
*The PyPy compatibility is half way there, but we will need more time.
*You can use 'qtpaths' not instead of 'qmake' when building PySide from source
*We added support for std::function for a couple of QThreadPool methods
*New QML functions were added, and it's now possible to use QmlRegisterSingletonInstance as well.


==Platform Changes==
==Platform Changes==


===Desktop===
===Desktop===
====macOS on Apple Silicon====
*Official support as both target and host
*Qt SDK libraries built as universal binaries
**Known limitations
***SSL not yet supported
***Missing database plugins (([https://bugreports.qt.io/browse/QTBUG-93204 QTBUG-93204])
***No JIT (([https://bugreports.qt.io/browse/QTBUG-93206 QTBUG-93206]).
====Windows on ARM64====
*Official support as a target (no host support yet) [https://docs.microsoft.com/en-us/windows/arm/]
**Known limitations
***Qt Webengine not yet supported (no official Chromium support yet)
***SSL not yet supported (no official OpenSSL support yet)
====Wayland Client on Linux====
*A touchpad pinch gesture generates Zoom and Rotate QNativeGestureEvents, if your compositor sends them via the pointer-gestures-unstable-v1 protocol; so you can operate a Qt Quick PinchHandler via a touchpad pinch gesture.  The number of fingers can be distinguished (from 2 to 4 fingers can be involved in a pinch gesture).  Two-finger flicking still generates QWheelEvents, as before.  A gesture of type Qt::PanNativeGesture can be generated by swiping with 3 or 4 fingers.


===Mobile===
===Mobile===
Line 163: Line 257:


*Some of the calls under (e.g. sdkVersion(), context(), etc.) QtAndroid namespace, previously under QtAndroidExtras, is now under QNativeInterface::QAndroidApplication ([https://bugreports.qt.io/browse/QTBUG-90496 QTBUG-90496]).
*Some of the calls under (e.g. sdkVersion(), context(), etc.) QtAndroid namespace, previously under QtAndroidExtras, is now under QNativeInterface::QAndroidApplication ([https://bugreports.qt.io/browse/QTBUG-90496 QTBUG-90496]).
*Permissions can be requested via a new API ([https://bugreports.qt.io/browse/QTBUG-90498 QTBUG-90498]).
*The remaining QtAndroidExtras APIs are left as private APIs under qtbase until clear cross-platform alternatives are in place (e.g. Intents, Services, etc.) ([https://bugreports.qt.io/browse/QTBUG-93689 QTBUG-93689]).
*The remaining QtAndroidExtras APIs are left as private APIs under qtbase until clear cross-platform alternatives are in place (e.g. Intents, Services, etc.) ([https://bugreports.qt.io/browse/QTBUG-93689 QTBUG-93689]).
*Removed Ministro dead code, since it's been unsupported by Android ([https://bugreports.qt.io/browse/QTBUG-85201 QTBUG-85201]).
*Removed Ministro dead code, since it's been unsupported by Android ([https://bugreports.qt.io/browse/QTBUG-85201 QTBUG-85201]).
Line 169: Line 262:
*QCDebug() and friends use the category as a tag in Android logcat ([https://bugreports.qt.io/browse/QTBUG-94708 QTBUG-94708]).
*QCDebug() and friends use the category as a tag in Android logcat ([https://bugreports.qt.io/browse/QTBUG-94708 QTBUG-94708]).
*Update Android Gradle plugin to 4.1.3 ([https://codereview.qt-project.org/c/qt/qtbase/+/342035 patch link]).
*Update Android Gradle plugin to 4.1.3 ([https://codereview.qt-project.org/c/qt/qtbase/+/342035 patch link]).
*non-SDK API bug with style fixed ([https://bugreports.qt.io/browse/QTBUG-71590 QTBUG-71590]), Android Style for widgets on Android 9+ still affected (see [https://bugreports.qt.io/browse/QTBUG-96149 QTBUG-96149]).
*The default targetSdkVersion is set to 30 to follow Google Play Store requirement ([https://bugreports.qt.io/browse/QTBUG-94451 QTBUG-94451]).
*The build-tools version and platform version used is bumped to 30.
*Support QDesktopService custom handlers on Android which allows to work with Android App Links for example ([https://codereview.qt-project.org/c/qt/qtbase/+/302459 patch link]).
*Add information about who launched the app ([https://codereview.qt-project.org/c/qt/qtbase/+/304280 patch link]).
*Fixes to importing QML modules and adding possibility to multiple QML root paths ([https://bugreports.qt.io/browse/QTBUG-93340 QTBUG-93340]).
*Fix Vulkan build on Android ([https://bugreports.qt.io/browse/QTBUG-92157 QTBUG-92157]).
====iOS====
*Improved CMake support
**Known issues
***Missing default launch screen storyboard
***Problems with custom libraries ([https://bugreports.qt.io/browse/QTBUG-95381 QTBUG-95381])


===Embedded===
===Embedded===
As part of Device Creation license


====Embedded Linux / Boot to Qt====
====Boot to Qt====
 
*Yocto 3.3 Hardknott
*Intel NUC10 (64bit i5 x86) reference target
*NVidia Jetson Tegra X2 target


====QNX====
====QNX====


==== INTEGRITY ====
*QNX version 7.1 Ubuntu 20.04 host and NXP iMX8QM reference target
 
====INTEGRITY====
 
*Integrity version 19.0.13 Ubuntu 20.04 host and Qualcomm Snapdragon 8155p reference target


==Changes in Installer==
====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.


==Porting guide==
==Porting guide==
When creating Qt 6, we retain as much compatibility with Qt 5 as possible, but some changes were inevitable to make Qt a better framework. To make it easier to port to Qt 6, we have created a [https://doc.qt.io/qt-6/portingguide.html Porting guide] to summarize those changes and provide guidance to handle them. In the [https://doc.qt.io/qt-6/portingguide.html guide], you can find links to articles about changes that may affect your application and help you transitioning from Qt 5 to Qt 6.
When creating Qt 6, we retain as much compatibility with Qt 5 as possible, but some changes were inevitable to make Qt a better framework. To make it easier to port to Qt 6, we have created a [https://doc.qt.io/qt-6/portingguide.html Porting guide] to summarize those changes and provide guidance to handle them. In the [https://doc.qt.io/qt-6/portingguide.html guide], you can find links to articles about changes that may affect your application and help you transitioning from Qt 5 to Qt 6.

Latest revision as of 07:39, 21 October 2021


See also https://doc.qt.io/qt-6/whatsnew62.html

New & Restored Modules

The following additional modules are available, that were not present in 6.1:

Qt Bluetooth
  • The Qt Bluetooth module has been ported to Qt 6 and the CMake build system
  • BlueZ 4 support was removed.
  • Win32 backend was removed. As consequence there is no more QtBluetooth with MinGW.
  • The QML interface/API was removed.
  • QBluetoothTransferManager and related classes were removed.
  • API elements in QBluetoothLocalDevice related to pairing agents were removed.
  • Many more API changes were done. For details check out the porting guide.
Qt Multimedia
  • The Qt Multimedia module has been ported to Qt 6 and the CMake build system with major refactoring of the functionality.
  • Public API of Qt Multimedia consists of 5 large functionality blocks with the APIs inside those blocks have undergone significant changes compared to Qt 5:
    • Device discovery
    • Low level audio
    • Playback and decoding
    • Capture and recording
    • Video output pipeline
  • The currently supported set of backends is:
    • Linux, using GStreamer
    • macOS and iOS using AVFoundation
    • Windows using WMF
    • Android using the MediaPlayer and Camera Java APIs
Qt NFC
  • The Qt NFC module has been ported to Qt 6 and the CMake build system.
  • iOS support was added and Linux/NearD support was removed.
Qt Positioning
  • The Qt Positioning module has been ported to Qt 6 and the CMake build system.
  • Many of the properties are now bindable.
  • Rename QGeoPolygon::path() to QGeoPolygon::perimeter.
  • QGeoLocation now uses QGeoShape instead of QGeoRectangle as a bounding area.
  • The error() signal in multiple positioning classes is renamed to errorOccurred().
  • QGeoPositionInfoSourceFactoryV2 is removed, and QGeoPositionInfoSourceFactory now supports custom parameters for the created objects.
  • NMEA support is redesigned. The serialnmea plugin is renamed to nmea and now supports reading the input stream from a TCP socket or a raw file. The nmeaSource property is removed.
Qt RemoteObjects
  • The Qt RemoteObjects module has been ported to Qt 6 and the CMake build system.
  • The local connection backend now supports abstract namespaces (this is a Linux-specific extension), achieved by using the new '
    localabstract
    
    ' schema in the URL.
  • Class enums and flags are now supported in .rep files.
  • Enums/flags are now supported inside POD types and as keys for QMap/QHash properties in .rep files.
  • Multiline comments (wrapped inside '/*' and '*/') are now supported in .rep files.
QtQuick Dialogs
  • Provides native dialogs with Qt Quick fallbacks for platforms where Qt does not have native dialogs.
  • Currently FileDialog and FontDialog are available, with more to be added in future versions.
Qt Sensors
  • The Qt Sensors module has been ported to Qt 6 and the CMake build system.
  • Most QML facing properties are now bindable
  • Sensor::type and and QSensor::type properties 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 (MSVC) builds supported (Windows RT in Qt 5)
  • 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 is not enabled yet (requires Qt 6 support first)
  • Sensor types that had only sensorfw backend are not listed as supported (IRProximity, Lid, and Tap)
  • Sensor types without any backend have been removed (Altimeter, Distance, and Holster)
Qt SerialBus
  • The Qt SerialBus module has been ported to Qt 6 and the CMake build system.
  • The QCanBusFactory has been removed and QCanBusFactoryV2 was renamed to QCanBusFactory.
  • QModbusRtuSerialSlave and QModbusRtuSerialMaster have been renamed to QModbusRtuSerialServer and QModbusRtuSerialClient and the new names shall be used in new code.
Qt Serialport
  • The Qt SerialPort module has been ported to Qt 6 and the CMake build system.
Qt WebChannel
  • The Qt WebChannel module has been ported to Qt 6 and the CMake build system.
  • QWebChannel properties are now bindable.
  • The property update interval of QWebChannel can be configured. It still defaults to 50ms.
  • QWebChannel 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 Qt WebEngine module has been ported to Qt 6 and the CMake build system.
  • The Qt WebEngine submodule for Qt Quick has been renamed from QtWebEngine to QtWebEngineQuick
  • Several classes have been moved from QtWebEngineWidgets to QtWebEngineCore including QWebEnginePage
  • Some functionality previously only accessible by deriving from QWebEnginePage can now be accessed using synchronous signals.
  • Favicon API added to QWebEngineProfile to lookup icons for specific urls.
  • New QWebEngineLoadingInfo class for more details about loading success/failure.
Qt WebSockets
  • The Qt WebSockets module has been ported to Qt 6 and the CMake build system.
Qt WebView
  • The Qt WebView module has been ported to Qt 6 and the CMake build system.

New Features (within existing modules)

Qt Core

  • Added
    • QByteArrayView::compare().
    • QFlags::test(Any)Flag(s) methods.
    • QHashSeed, to control hashing (seeds are now size_t); this shall replace qGlobalQHashSeed and qSetGlobalQHashSeed.
    • PRIxQTDATATYPE macros to facilitate printf()-style formatting without casts or warnings.
    • A permissions API to QCoreApplication (for things like access to camera, file system, network on devices). Delayed, the API is private for now.
  • Many properties are now bindable.
  • Grapheme clusters can now handle emojis.
  • UNC paths and network shares on Windows are now handled consistently.
  • 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 (see QTBUG-91736, QTBUG-94215).
  • QByteArray::number()'s overloads for signed integral types, when passed a negative integer and any supported base now (like QString::number() since 6.0) return a text using minus sign followed by the number's absolute value, instead of coercing to an unsigned type for all bases except ten.
  • QCalendar now supports construction from the ID of a custom backend.
  • QChar, QPoint and QPointF are now primitive, rather than merely relocatable.
  • QCoreApplication's exit() is now, like quit(), a slot (as the documentation has 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.
  • QFlags has fleshed out its value-type behavior (and is now used more systematically).
  • QList (hence also QVector) is now, when building for C++20, a contiguous_iterator satisfying contiguous_range.
  • QLocalSocket::waitFor*() now support duplex operation on Windows (like they already did on Unix).
  • QLockFile's methods now have std::chrono overloads (and avoid needless conversion between UTC and local time).
  • QString can now be built from char8_t (when available).
  • QThreadPool's thread priority is now configurable; and the threads share the pool's name, if it has one.

… and there's been lots of tidy-up, bug-fixing and improvements to documentation.

Qt Gui

  • Floating point image formats added to QImage for both 16-bit and 32-bit floats.
  • Converting RGB images to, or painting RGB colors onto, grayscale images is now gamma corrected and produces in 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

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

Qt Quick Controls

  • New control added: SelectionRectangle. This control can be used to select cells in a TableView by using a styled selection rectangle.

Qt Widgets

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

Qt Network

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

Qt Qml

  • Core language
    • Added support for optional chaining
    • Added as casts: those mostly help tooling, but can also be used to replace some usages of instance of (return (obj instanceof Item) ? obj.width : 42 vs (obj as Item)?.width ?? 42)
  • Public CMake API for QML modules (qt_add_qml_module)
    • takes care of generating qmldir and qmltypes
    • can automatically create plugin if plugin only registers types
    • built-in support for linting target
  • Tooling
    • qmllint
      • Added support for granularly setting warning severity, from disabling them altogether, to making them informational only, to them leading to a non-zero exit code
      • Added 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 JSON output for use in tooling
    • qmlformat
      • qmlformat now utilizes our new qmldom library and should generally produce better output because of it

Qt Quick 3D

  • Instanced Rendering, an optimized way of drawing multiple instances of the same objects with different transformations.
  • 3D Particles, an API for adding particle effects to 3D scenes. This includes a technology preview of model blend particles, intended to be finalized in 6.3.
  • Qt Quick Input events for 2D items in 3D (both in scene and in textures)
  • Additional API for ray based picking from arbitrary points in the scene
  • RuntimeLoader
    • Makes it possible to load glTF2 files at runtime
  • Parallax Occlusion Mapping: Enables the use of height maps without the cost of adding geometry
  • Depth Draw Mode on materials: Enables fine control over if and when depth rendering takes place for a material.

Qt DataVisualization

  • Background rendering mode fixed.
  • RenderDirectToBackground_NoClear deprecated, as not clearing window is no longer an option in Qt 6.x.
  • Lots of minor bug fixes.

Qt Charts

  • More marker shapes are available to pick from in QScatterSeries and QLegend.
  • Added Light marker feature to QXYSeries and QLegend. This is a lighter weight rendering of points.
  • Added ability to select points in a series via method calls to QXYSeries and QBarSet.
  • Added ability to set a color or use a custom light marker to be used for selected points in QXYSeries.
  • Added ability to set a color to be used for selected bars in QBarSet.
  • Added a feature to display the best fit line of QXYSeries through new methods added to QXYSeries.
  • Added ability to customize the look of individual points in a series to QXYSeries. The feature allows one to set points visibility, points label visibility and points size.
  • Added method “sizeBy” to QXYSeries that adjusts size of the points in the series according to passed values.
  • Added method “colorBy” to QXYSeries that adjusts color of the points in series according to passed values and gradient.
  • Added a new axis class QColorAxis to support colorBy feature, displaying a color scale.
  • Added 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 on double-click, and once detached, dragged and resized on the chart. Legend can then be automatically attached to an edge of the chart by dragging it off of the edge.
  • Added attachedToChartChanged signal to QLegend.
  • Updated legend example.

Qt for Python

  • New examples, tutorials, and videos were added
 https://doc.qt.io/qtforpython-6/
  • Even if it's not released yet, we are compatible with Python 3.10rc2
  • The modules QtDBus, QtNetworkAuth, and QtBluetooth were added.
  • Shiboken has now a new feature called Opaque Containers, to avoid
 copying C++ containers into Python to use them.
  • The PyPy compatibility is half way there, but we will need more time.
  • You can use 'qtpaths' not instead of 'qmake' when building PySide from source
  • We added support for std::function for a couple of QThreadPool methods
  • New QML functions were added, and it's now possible to use QmlRegisterSingletonInstance as well.

Platform Changes

Desktop

macOS on Apple Silicon

  • Official support as both target and host
  • Qt SDK libraries built as universal binaries

Windows on ARM64

  • Official support as a target (no host support yet) [1]
    • Known limitations
      • Qt Webengine not yet supported (no official Chromium support yet)
      • SSL not yet supported (no official OpenSSL support yet)

Wayland Client on Linux

  • A touchpad pinch gesture generates Zoom and Rotate QNativeGestureEvents, if your compositor sends them via the pointer-gestures-unstable-v1 protocol; so you can operate a Qt Quick PinchHandler via a touchpad pinch gesture. The number of fingers can be distinguished (from 2 to 4 fingers can be involved in a pinch gesture). Two-finger flicking still generates QWheelEvents, as before. A gesture of type Qt::PanNativeGesture can be generated by swiping with 3 or 4 fingers.

Mobile

Android

  • Some of the calls under (e.g. sdkVersion(), context(), etc.) QtAndroid namespace, previously under QtAndroidExtras, is now under QNativeInterface::QAndroidApplication (QTBUG-90496).
  • The remaining QtAndroidExtras APIs are left as private APIs under qtbase until clear cross-platform alternatives are in place (e.g. Intents, Services, etc.) (QTBUG-93689).
  • Removed Ministro dead code, since it's been unsupported by Android (QTBUG-85201).
  • Simplified the AndroidManifest.xml file to only contain relevant tags for the user, removing the clutter that the user don't need to maintain (patch link).
  • QCDebug() and friends use the category as a tag in Android logcat (QTBUG-94708).
  • Update Android Gradle plugin to 4.1.3 (patch link).
  • non-SDK API bug with style fixed (QTBUG-71590), Android Style for widgets on Android 9+ still affected (see QTBUG-96149).
  • The default targetSdkVersion is set to 30 to follow Google Play Store requirement (QTBUG-94451).
  • The build-tools version and platform version used is bumped to 30.
  • Support QDesktopService custom handlers on Android which allows to work with Android App Links for example (patch link).
  • Add information about who launched the app (patch link).
  • Fixes to importing QML modules and adding possibility to multiple QML root paths (QTBUG-93340).
  • Fix Vulkan build on Android (QTBUG-92157).

iOS

  • Improved CMake support
    • Known issues
      • Missing default launch screen storyboard
      • Problems with custom libraries (QTBUG-95381)

Embedded

As part of Device Creation license

Boot to Qt

  • Yocto 3.3 Hardknott
  • Intel NUC10 (64bit i5 x86) reference target
  • NVidia Jetson Tegra X2 target

QNX

  • QNX version 7.1 Ubuntu 20.04 host and NXP iMX8QM reference target

INTEGRITY

  • Integrity version 19.0.13 Ubuntu 20.04 host and Qualcomm Snapdragon 8155p 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.

Porting guide

When creating Qt 6, we retain as much compatibility with Qt 5 as possible, but some changes were inevitable to make Qt a better framework. To make it easier to port to Qt 6, we have created a Porting guide to summarize those changes and provide guidance to handle them. In the guide, you can find links to articles about changes that may affect your application and help you transitioning from Qt 5 to Qt 6.