Qt 6.2 LTS Released
I'm happy to announce the release of Qt 6.2. Qt 6.2 is the release we've all been working towards since we started our path towards a new major version of Qt. It benefits from all the architectural upgrades we've done for Qt 6 and includes essentially all the additional modules you enjoyed with Qt 5.15.
Qt 6.2 is also the first release of Qt 6 that will be long-term supported by The Qt Company for Qt commercial customers.
Our plan when moving to Qt 6 has been to focus on the core of Qt first and doing the architectural changes that we believed were required to keep Qt competitive in the years to come. But that focus also meant that we had to compromise on the add-ons we supported when we released Qt 6.0. So, even though Qt 6.0 is better and more advanced than Qt 5.15, it did lack some of the functionality that Qt 5.15 provided. With Qt 6.2 we have closed that gap and include all the commonly used functionality from Qt 5.15 as well as the new features added for Qt 6.
With the release of Qt 6.2, almost all our users should be able to migrate their code from Qt 5 over to Qt 6. We have done so with our own tooling. Namely, Qt Design Studio 2.2 and the soon-to-be-released Qt Creator 6 beta are both based on Qt 6.2 LTS.
Apart from adding missing features, Qt 6.2 focused on improving stability, performance, and developers' quality of life.
Let's recap some of the main changes in Qt 6 before having a closer look at what's new in 6.2, specifically.
Architectural changes for Qt 6
We made a couple of more extensive architectural changes in Qt 6 that we are now building upon with Qt 6.2 and any future release. Those changes included
- Leveraging C++17 We wanted to build upon a modern C++ standard when working on Qt 6. C++17 was the latest version released, and Qt 6 now relies on a C++17 compatible compiler. This made it possible to both clean up and improve our code base and offer more modern APIs to our users.
- Improvements to our low-level container classes with regards to handling large data sets and performance.
- Next-generation QML We have started a greater effort towards renewing the QML language and make it safer and easier to use in the future. Qt 6.0 – 6.2 laid the foundations here, but this ongoing effort will continue throughout the Qt 6 series.
- Bringing property bindings to C++ Property bindings have been one of the concepts that made QML so successful. With Qt 6, we have been making that concept available in C++.
- New graphics architecture Qt 6 put a whole new architecture in place on how to handle the integration with APIs of the underlying operating system. Thanks to the new Rendering Hardware Interface (RHI), Qt 6 now uses the best graphics API available on each system by default, significantly increasing compatibility – especially on desktop and mobile operating systems such as Windows and macOS, and iOS.
- Unified 2D and 3D for Qt Quick Qt Quick has traditionally been a framework for building animated and fluid 2D user interfaces. With Qt 6, we simplified integrating 3D content to your QML based application, too. A deep integration makes it trivial to mix 2D and 3D content at any level while getting the maximum performance out of the system.
- CMake build system With Qt 6, we switched our build system from qmake to cmake, the standard build system for C++-based apps nowadays. While qmake is still supported for the lifetime of Qt 6, preliminary user reports indicate significant improvements after switching to cmake.
Despite all those changes, porting your existing code base to Qt 6 should be straightforward. You can read more about it further down in the blog post.
Let's now have a closer look at what's new in Qt 6.2.
One of the major efforts when developing Qt 6.2 has been to add back all the modules and functionality that we left out in Qt 6.0. With very few exceptions, all modules that have been supported in Qt 5.15 are now also supported in Qt 6.2.
With Qt 6.2, we've added support for the following additional modules (on top of what we already had in Qt 6.1):
- Qt Bluetooth
- Qt Multimedia
- Qt NFC
- Qt Positioning
- Qt Quick Dialogs
- Qt RemoteObjects
- Qt Sensors
- Qt SerialBus
- Qt SerialPort
- Qt WebChannel
- Qt WebEngine
- Qt WebSockets
- Qt WebView
The API for these modules is in mostly backwards compatible with Qt 5 and will only require minor adjustments of user code when porting to Qt 6.
New features in Qt 6.2
In addition to many modules we've brought over from Qt 5, we also have a large set of new features and functionality in 6.2. Let's have a look.
Qt Quick 3D
Qt Quick 3D has gained some cool new features and now supports instanced rendering, allowing you to render large amounts of the same object with different transformations. We also added a new API for adding 3D particle effects to a scene.
Input handling has been improved and we now correctly create Qt Quick input events for 2D items embedded in a 3D scene. We also added a new API to do ray-based picking from arbitrary points in the scene.
The QML linter (qmllint) is a tool that checks QML source code for best practices, potential coding and performance problems and helps writing more maintainable QML. The tool has undergone large changes and is now fully configurable, both at the command line level, through configuration files, and even for individual blocks within a QML file itself. In addition, it can now generate JSON output to simplify integration with other tools or automated systems.
The QML formatter (qmlformat) now uses the QML dom library, giving large improvements to the generated output.
Have a look at this blog post for more details.
Qt Multimedia has undergone some rather significant changes with Qt 6. It was one of the APIs we were not happy with during the lifetime of Qt 5. Because of that, we took a step back and did some more extensive API and architectural changes to the module without too much respect for backwards-compatibility.
Nevertheless, it should be relatively straightforward to port from Qt Multimedia in Qt 5 to Qt 6.
Qt Multimedia in Qt 6 does support several highly requested features we never managed to support properly in Qt 5. Examples include subtitle and language selection support for playback and a configurable setup for media capture.
The internal architecture has been cleaned up and is not exposed through public API as in Qt 5 anymore. This will allow us to fix bugs faster and makes it significantly easier to add new features in the future. You can find more details in the separate blog post about Qt Multimedia in Qt 6.
Due to these massive changes, however, the module still has rough edges and probably quite a few bugs in the implementation. However, we believe that multimedia is such an essential piece of functionality that we will fully support the module in Qt 6.2.
Because of this, we will deviate a bit on our regular commit policy for patch level releases and might include some smaller API additions if those are required to fix larger issues.
In addition, we will work hard on fixing any reported bug as quickly as we can in upcoming patch level releases.
Smaller improvements throughout
Almost all other modules have seen lots of smaller API additions and improvements.
We have been porting many APIs over to make use of the new property system, so that you can use property bindings from C++. That effort is not yet complete and we be continued in future releases.
We've also fixed many API shortcomings and missing features in various places. To mention just a few examples:
- Qt Charts has gotten some new API to improve convenience and make things more customizable.
- We've added floating point image formats to QImage.
- QByteArray::number() now correctly handles negative values for bases different than 10.
- QLockFile now has overloads that take std::chrono
- Qt Network supports multiple SSL backends that can co-exist at runtime.
For all the detail, have a look at the new features page in our wiki.
Qt Creator and Qt Design Studio
A lot of work has also gone into Qt Creator and Qt Design Studio to make sure they deliver first-class support for Qt 6.2. Qt Creator 5 comes with everything you need to develop for Qt 6.2.
We have also released a brand new version of Qt Design Studio today. Qt Design Studio 2.2 is based on Qt 6.2 and brings great support for creating Qt Quick and Qt Quick 3D-based user interfaces in one graphical tool. And you can easily test those on your target hardware, whether that's your desktop, mobile, or an embedded device. Have a look at the separate blog post about Qt Design Studio 2.2 for more details.
For Qt 6.2, a lot of work has happened to improve our support of the currently supported platforms, both on the desktop and mobile side, by, e.g., improving our support for HighDPI rendering and adding an NFC backend on iOS.
On top of that, Qt 6.2 has expanded the scope of supported platforms drastically:
Qt 6.2 fully supports macOS on Apple Silicon. Qt now makes it easy to create universal binaries and to develop for macOS on both Intel and Apple Silicon. Of course, that version is also fully tested in our CI system. It has always been possible to run Qt applications on Apple silicon via the Rosetta layer, but Qt 6.2 now provides full support to run natively on the Apple silicon.
Qt 6.2 also brings back support for the INTEGRITY and QNX real-time operating systems. The support requires a C++17 toolchain and an up-to-date version of the operating system. The minimum requirement for QNX is version 7.1, on INTEGRITY we support version 19.0.13.
webOS validation against Qt 6.2 has also been concluded to strengthen Qt's commitment to webOS further.
There's a lot of work ongoing to support Windows 11, and we expect to be able to provide full support for it in a 6.2 patch-level release. Windows on ARM HW is also available as a Technology Preview with Qt 6.2.
Finally, we've done further work to improve our support for WebAssembly, which is supported as a Technology Preview in Qt 6.2.
Qt for Python was also released today, so you can try it out. A separate blog post will be published in the next couple of days to highlight all the features on top of the adoption from the latest Qt 6.2 changes. Stay tuned!
Porting from Qt 5
While working on Qt 6, source compatibility with Qt 5 has always been a crucial part of our work. There are a few places where we had to break that compatibility to some extent to do some required architectural changes or give us some large performance benefits.
Porting from Qt 5 to Qt 6 should, in most cases, be straightforward. The Qt 6 porting guide lists the required steps and has more information. You can also get porting help from one of our partners or our consultants.
The typical steps for porting to Qt 6 are:
- Check that you have a supported compiler and platform version in use
- Compile first with Qt 5.15 in the Qt 6 -mode (using the QT_DISABLE_DEPRECATED_BEFORE macro)
- Then compile with Qt 6.x - if needed, leverage the compatibility modules in the porting phase
With these, you have the application running on Qt 6 and can start using all the new features and functionality it provides. For example, if your application uses QML, run the qmllint tool and fix the warnings it gives.
In this context, I would also like to mention the new 0.9 version of the online book about QML and Qt 6. It's a great resource to get started with QML or learn more about it. We want to thank the main authors behind the book who are Johan Thelin, Jürgen Ryanell, and Cyril Lorquet, and would also like to acknowledge the community members who also have been involved. The project is sponsored by The Qt Company and is a living document that will get further updates moving forwards. Have a look, and please give credit and feedback to the project.
Try it out today
Before providing you with the links to download Qt 6.2, I'd like to point you to the release notes for Qt 6.2. The release notes also contain many details about our changes since Qt 6.1, including a comprehensive list of the bugs fixed.
They also contain a complete list of everybody that has contributed patches to Qt 6.2. The list is too long to reproduce here, but I'd like to thank everybody for helping and making Qt 6.2 happen.
I hope you will enjoy Qt 6.2. Let us know how things are going and report any bugs you might find to make Qt 6.2 even better with upcoming patch releases.
Stay tuned for more
Last but not least, here's a quick update on what else we have in store in the near future. A good place to follow and get an overview of what is happening is the dedicated Qt 6 web page.
Then, I'd like to invite you to join Tuukka Turunen and myself in an upcoming AMA webinar, where you can ask us your questions you might have about the new release. You can sign up for free on our webinar portal and submit your questions in advance via the form. For your convenience, we will be conducting two webinars in different time zones. Pick the one which is more convenient for you, or join both.
Qt World Summit 2021 is also coming up fast, and I'd like to encourage you to join us. We will hear a lot more about the upcoming highlights in Qt 6 from ourselves, our customers, and members of the Qt ecosystem. You can register for the free online event on the Qt World Summit website.
Thanks everyone, and we from The Qt Company hope you will enjoy the new Qt 6.2 LTS!
Subscribe to our newsletter
Try Qt 6.6 Now!
Download the latest release here: www.qt.io/download.
Qt 6.6. is a feature release with focus on improving UX capabilities including responsive UI technology and the Qt Graph module.
Check out all our open positions here and follow us on Instagram to see what it's like to be #QtPeople.