Qt for MCUs 2.4 released
Qt for MCUs 2.4 enables developers across industries to create next-generation smartphone-like graphical user interfaces for resource-constrained and cost-efficient embedded devices, with more ease and flexibility than ever before. Thanks to the continuous feedback from our users, this new release includes several new features and improvements, including support for sprite animations, a more flexible code generation and build process, and more!
The complete list of changes in this version is in the changelog in the online documentation. Continue reading for more details on the content of this release.
AnimatedSprite and AnimatedSpriteDirectory are new Qt Quick Ultralite types that enable playback of pre-rendered video frames with animation speed control and compile-time optimizations for reducing ROM usage.
Complex animations and graphical effects are becoming a common requirement in modern MCU-based GUI designs. The absence of inbuilt video decoders and 3D HW acceleration in microcontrollers makes it hard to achieve the desired effects. The new APIs, both a subset and an extension to Qt6's AnimatedSprite, help create different types of animations at a reasonable memory cost.
Animated icons are a common use case for sprite animations, but Qt Quick Ultralite's efficient implementation is also a good fit for higher-resolution use cases such as device boot-up animations, short videos, or any complex animation that cannot be rendered in real-time on MCUs, such as 3D.
The frames of an animation can either be collated into a single image asset, or stored as individual files in a directory. As with regular images, resource settings can be used to fine-tune performance and size. Frames are additionally optimized at compile time to minimize ROM footprint by reusing common regions between frames.
Future releases will introduce new optimization options to automatically reduce the data size further.
Standalone QML to C++ code generation
qmlprojectexporter is a new command-line tool introduced in Qt for MCUs 2.2 LTS as Technology Preview. In Qt for MCUs 2.4, the tool is upgraded to a stable feature after having received many improvements and fixes since its initial release.
Since the launch of Qt for MCUs 1.0, the code generation—and more generally the build process—of a Qt for MCUs application has been tied and limited to the use of CMake. While the popular aforementioned build system remains the default and preferred approach, qmlprojectexporter enables many new development and build workflows by providing standalone generation of C++ code from the QML files and other GUI-related resources in your application. For example, it can be used to integrate a Qt Quick Ultralite GUI in any third-party IDE project or build system.
To generate code, qmlprojectexporter needs a .qmlproject file, which contains a simple description—itself based on the QML language—of all assets and settings of a GUI. The format is not new and has been originally created for Qt Design Studio, but it has been extended to support all of Qt for MCUs features. This concretely makes it an interchange format for different Qt tools, including Qt Design Studio, Qt Creator, and qmlprojectexporter. When using Qt for MCUs' CMake-based build system, you can now simply include a .qmlproject using the qul_add_target command, instead of adding QML files, images, and fonts to the CMakeLists.txt project file.
How does this feature impact you?
- Your existing Qt for MCUs projects are fully compatible with 2.4 and any future 2.x versions, without making any changes. Some of the QML and resource-related CMake commands have, however, been deprecated and we recommend migrating the QML parts of your CMake project to .qmlproject with the help of the following migration guide.
- New Qt for MCUs projects created in Qt Design Studio and Qt Creator use the new feature by default. The .qmlproject file is automatically created for you.
In future versions, this feature will enable us to provide out-of-the-box support for third-party IDEs such as IAR Embedded Workbench, Green Hills MULTI, NXP MCUXpresso IDE, STMCube IDE, Renesas e2 Studio, and others.
Platform validation test suite
A set of manual tests is now included in Qt for MCUs. It simplifies the validation of custom platform ports or modifications to our reference ports. You can run them on your target hardware and compare with the output on desktop to verify that all Qt Quick Ultralite features are working as expected.
For example, the animations test can be used to spot various rendering glitches, while the pathstroke test can highlight issues with implementation of hardware-accelerated 2D vector graphics.
To learn more, you can refer to the Testing a new platform documentation page.
In the endeavor to make third-party integration seamless, Quick Start Guides for NXP i.MX RT1170, Renesas RH850/D1M1A, and Infineon Traveo II are added in this release. In addition, Infineon Traveo II 4M (CYT3DL) variant is now supported as a reference port and can be installed through the Qt Online Installer/Maintenance tool.
Performance-wise, memory footprint optimizations have been introduced in the core framework, decreasing the static allocations in RAM (.bss) of all applications by an average of 2% to 4%. QML Component management is further improved by extending Loader to support dynamic memory allocation/deallocation through the sourceComponent property.
The next feature update is planned for June 2023 with version 2.5 LTS. Besides being the second Long-Term Support release of Qt for MCUs, highlights for this release will include a software vector graphics renderer to use Qt Quick Shapes on any microcontroller, font cache data compression, and an ever lighter Qt Quick Ultralite engine.
Get Qt for MCUs 2.4 today!
If you’re an existing Qt for MCUs developer, you can download Qt for MCUs 2.4 from the Qt Maintenance Tool, located at the root of your Qt for MCUs installation directory. If you're looking to dive in for the first time, click here to get started. Either way, we hope you enjoy the new features and improvements, and as always, we would love to hear your feedback and feature requests in the comments or by contacting us using this form.
Subscribe to our newsletter
Try Qt 6.5 Now!
Download the latest release here: www.qt.io/download.
Qt 6.5 is the latest Long-Term-Support release with all you need for C++ cross-platform app development.
Qt World Summit 2023: Berlin awaits!
Check out all our open positions here and follow us on Instagram to see what it's like to be #QtPeople.