The Qt Company has officially announced their first release of a new major version, Qt 6. It marks a major milestone for Qt and a great leap towards a modern graphics stack.
Qt is a cross-platform application development framework for desktop, embedded, and mobile devices. Qt 5 has been a great success over the years. It was released 8 years before in 2012.
Qt supports many platforms including Linux, OS X, Windows, VxWorks, QNX, Android, iOS, BlackBerry, Sailfish OS, and many more. The framework is written in C++ and uses MOC (Meta-Object Compiler) as a preprocessor for extending language features like signals and slots.
What’s new in Qt 6?
Let’s have a look at what’s new in Qt 6.
Qt 6 now requires a C++17 compatible compiler for enabling the use of modern C++ language constructs, which will be helpful for integration on the API side.
Core libraries and APIs
Many changes have come to Qt Core. Qt Core module implements the most central parts of the framework. Some vital changes are:
- Qt 6 added new property and binding systems. It brings the concept of bindings that made QML such a huge success in Qt 5.
- Qt 6 is now completely Unicode where they started aiming that from Qt 5.
- QList and QVector are unified into one class in Qt 6. QList has been a class in Qt 5 which was often criticized as it was used for heap allocating objects and creating pressure on hep allocation methods.
- QMetaType and QVariant have undergone a complete rewrite in Qt 6.
- Qt Concurrent got an almost complete rewrite. So, developing multi-threaded applications are more effortless than ever in Qt 6.
New Graphics Architecture
- The graphics architecture of Qt 5 was mostly dependent on OpenGL. Now Qt 6 has a large set of different graphics APIs including Vulkan and Metal.
- 3D graphics of Qt Quick is now built on top of a new abstraction layer called RHI (Rendering Hardware Interface). RHI uses the native 3D graphics API of the underlying OS/platform. So, Qt Quick will now use Direct3D on Windows, Metal on macOS, and OpenGL/Vulkan on Linux.
- Qt 6 added a new module called QtShaderTools to handle different shading languages across different graphics APIs.
Qt Quick 3D and Qt 3D
Qt 6 has enabled seamless integration between 2D and 3D graphics items. Now you can place a 2D item into a 3D scene. Most importantly both are using RHI.
Native Desktop Styling for Qt Quick
Qt 5 did not support desktop styling in Qt Quick but in Qt 6 it supports the pixel-perfect native look and feel on both macOS and Windows.
Build System and Packaging
Qt 6 is now built using CMake. Previously qmake was preferred to build Qt projects. Now it’s the opposite, CMake is preferred while qmake is supported for the lifetime of Qt 6.
Qt 6 now comes with a much smaller default package and many add-ons are distributed as separate packages through a package manager. This will help users to get a cleaner development environment and developers will be able to release features more frequently.
Fractal scaling is now supported in Qt 6, which allows automatic UI scaling for different monitor configurations.
Improved Networking Capabilities
Now you can create your own protocol backends and integrate them into the Qt workflow. Security related features are also added automatically in Qt 6.
Qt for Microcontrollers (MCU)
Qt 6 now supports a lightweight rendering engine to deploy QML based UIs on low-cost hardware with 2D hardware acceleration. It’ll enable optimal graphics performance with a minimal footprint (>80 kB RAM).
There are few modules of Qt 5 which haven’t been ported yet to Qt 6. Modules like Qt Multimedia, Qt Bluetooth and Qt Virtual Keyboard, and many others will be ported within Qt 6.1, 6.2, or later. The Qt Company transparently acknowledged that Qt 6.0 is not feature-complete as Qt 5.15.
Download Qt 6
You can also expect a new version of Qt Creator and Qt Design Studio to be released before Christmas! They will come with full support for Qt 6.
You can download the new version of Qt 6 from their website.
Qt 6 has moved towards modern graphics architecture, and I think it was necessary and well-timed. What do you think? Let me know in the comment section.