Choosing Between Qt 5 and Qt 6 for Your Embedded Linux Application
Qt 6 has been out for a while. Should you start your new project with Qt 6 or Qt 5? What reasons are there to stay on Qt 5 today?
15/12/2022
Nathanaël Landais
You're starting a new embedded Linux project and your choice has settled on the Qt framework. Qt was released in version 6.0 on December 8, 2020. It succeeds version 5 which was developed over 8 years.
Qt Overhaul Still in Progress
If it's a new version, why not use it rather than starting with Qt 5? Unfortunately it's not that simple! Qt 6 isn't an iterative update of Qt 5, but rather an overhaul and this overhaul isn't completely finished today.
That doesn't mean you shouldn't use Qt 6—you should obviously favor Qt 6 over Qt 5 whenever possible. Qt 5 is no longer being developed and bug fixes are no longer published as open source (because yes there are still some, it's inevitable for a framework of this size). Qt 5 remains maintained, but only under commercial license. If you want to develop your embedded Linux application under open-source license (as I explain in this article on Qt and the LGPL license), you'll then be forced to live with any bugs or fix them yourself.
So what's missing from Qt 6? A certain number of modules, which you'd do well to check before launching into development.
If one or more of these modules is essential for you, you'll have the choice between finding an alternative or doing your development on Qt 5.
At the time of writing, practically all modules have been ported.
The modules missing in version 6 are as follows:
- Qt Graphical Effects (externalized from the Qt project)
- Qt Location (under development)
- Qt Purchasing (abandoned)
- Qt Script (abandoned)
- Qt Script Tools (abandoned)
- Qt Speech (under development)
- Qt XML Patterns (abandoned)
Compatibility with Your Yocto BSP
The choice of Qt version may be imposed on you by your SOM manufacturer. Quite simply, if the Yocto BSP provided by the manufacturer is on a version of Yocto that's too old (before Gatesgarth 3.2), it won't be compatible with the meta-qt6 layer and unless you make the necessary adaptations yourself, you'll only have access to meta-qt5.
If this is your case, depending on your project's progress, consider another manufacturer, or use Qt 5, which is still very functional!