We’re sure you’ve heard by now about the release of Qt 6.0 — but are you ready? Join the conversation with our Qt Engineers to discuss the present and future of Qt 6. Ranging from API updates to porting tips, we’ll save you valuable time by giving a shortcut overview of changes that have made it into this first version.
2. Integrated Computer Solutions Inc. www.ics.com
Host Changes
Support removed for :
● Windows 7 & 8.x
Development hosts supported:
● Windows 10 (64bit Intel; msvc2019 or mingw81/gcc8.1)
● macOS 10.15 (64bit Intel; XCode 11)
● Linux:
● Ubuntu 20.04 (64bit Intel; gcc9)
● CentOS 8.1 (64bit Intel; gcc9)
● SLES 15 (SUSE Linux Enterprise Server, 64bit Intel; gcc10)
● Open SUSE 15.1 (64bit; gcc9)
2
3. Integrated Computer Solutions Inc. www.ics.com
Target Changes
Support removed for :
● Windows 7 & 8.x
● Apple watchOS & tvOS
Gradual addition of targets across 6.0, 6.1, and 6.2 releases
3
4. Integrated Computer Solutions Inc. www.ics.com
Yocto Support
● Meta-Qt6 layer for Yocto 3.1 Dunfell
● 4 ready made boot2qt images for imx6 and imx8 based devices
4
6. Integrated Computer Solutions Inc. www.ics.com
Modules Added to Qt 6
● Qt5Compat
● QtShaderTools
Additional modules available via the package manager:
● Qt Image Formats
● Qt 3D
● Qt Network Authorization
6
7. Integrated Computer Solutions Inc. www.ics.com
Porting Qt 5 to Qt 6
● Qt 5 and Qt 6 binaries are not compatible
● Requires the source code to be recompile
● Minor changes to source code
● Qt 5 Core Compat Module available to help ease porting
cmake : find_package(Qt6 COMPONENTS Core5Compat REQUIRED)
target_link_libraries(mytarget PUBLIC Qt6::Core5Compat)
OR qmake : QT += core5compat
7
8. Integrated Computer Solutions Inc. www.ics.com
Containers
● Removed 2G size limit, making use of qsizetype
● QList and QVector
● QHash, QMap, QMultiHash, and QMultiMap
● QHash reimplemented (3x faster than Qt5 version)
8
9. Integrated Computer Solutions Inc. www.ics.com
Strings
● All text handling are unicode
● UTF-16 - default when encoding
● UTF-8 - default when storage
● QUTF8StringView
● QRegularExpresion used exclusively
● QRegExp removed
9
10. Integrated Computer Solutions Inc. www.ics.com
QML
● Binding infrastructure is moved to Qt Core
● Support for lazy binding evaluations
● Provide binding functionality in the C++ space
● Performance improvements
● Added macOS and Windows native desktop styles for QQC
10
11. Integrated Computer Solutions Inc. www.ics.com
Graphics
● Major haul of changes
● Qt Rendering Hardware Interface (RHI) officially included
● Qt Quick and Quick 3D fully ported to RHI
● Unified scene graph for 2D and 3D
● Qt Quick 3D is faster
● There's a QShaderTool class now that takes care of cross compiling for
different platforms
● Native graphics' API is used by default
● Qt High DPI scaling is now activated by default; the default rounding policy is
PassThrough
11
12. Integrated Computer Solutions Inc. www.ics.com
Concurrent
● Chain of computation
QFuture<int> future = ...;
future.then([](int res1){ ... }).then([](int res2){ ... })...
● QtConcurrent::run() can now take a variable number of arguments
● All the QtConcurrent methods have been improved to forward the passed
parameters and avoid extra copies.
12
13. Integrated Computer Solutions Inc. www.ics.com
Additional Notes
● Requires C++17 compliant compiler
● MOC does not do string lookup of types anymore and does dynamic adding
and removing of bindings
● Open source license remains the same as Qt5.
● Commercial licenses need to be of a specific type to get access to Qt 6
13
14. Integrated Computer Solutions Inc. www.ics.com
Announced Plans by The Qt Company
Qt 6.1
- End of April 2021
- Yocto 3.2
- QNX & INTEGRITY support in tech preview
- Support for WebAssembly (WASM) coming back
Qt 6.2
- End of September 2021
- LTS
- Extended list of targets
- QNX & INTEGRITY supported as a part
macOS on ARM soon
14