Qt for Embedded Systems

By | February 14, 2018

TAQ self-balancing robot has software that is written on the Qt framework
Image 1. TAQ self-balancing robot has software that is written on the Qt framework

The Qt development framework presents a rich set of tools for the creation of cross platform applications with an advanced UI. The framework supports all popular desktop and mobile operating systems and shares 5th-6th place in a global non-official rating of all cross platform and hybrid toolchains for desktop and mobile development.

The most interesting thing about Qt is that it has another pretty excellent property: this framework is 100% applicable for embedded applications both with and without UI. Before you think “But this is mainly a UI tool!” we should say that the Trolltech Company released the Qt/Embedded library in August 2000! Qt/Embedded is memory efficient enough to be responsive even on slow processors and can provide crisp and vivid graphics on a multitude of displays. Companies like Ericsson, Mizi Research and PalmPalm Technologies of Korea have used Qt/Embedded on a multitude of hardware projects. On the low end, Mizi had Qt/Embedded running on its SmartPhone with 18 MHz ARM7 processors with only 2 MB of DRAM and 4 MB flash. By 2006 Qt was the software base for millions of mobile phones (actually, embedded device at that moment) and from 2008 Nokia started to build their devices based on Qt. Also, the time of execution depends from several other conditions. For example, hardware selection and hardware architecture, along with the developer’s experience. Did you know about the amazing experiment when after optimizing the system image in an embedded Qt’s application the loading time decreased from 22.5 to 1.5 seconds? Also, it is necessary to note, that the Qt version influences the graphics initialization time significantly.

Loading Time Reduction after Optimizing System Image
Image 2. Loading Time Reduction after Optimizing System Image

Graphics init time, 1 shader programs
Image 3. Graphics init time, 1 shader programs.

We surely do not want to say anything bad about other tools for embedded systems development and even can list some of them right here for you: wxWidgets, JUCEC, EGUI, GTK+, EFL or even HTML5/JavaScript! But a Qt application possibly shows better performance and can be developed faster. The DevelopEx Company has been implementing applications with C++ and particularly the Qt framework for a long time now. And we are assured that the most optimal way to create and maintain multiplatform applications is through the use of the Qt framework.

Why not use a traditional approach?

By a traditional approach we mean development using a specific toolchain like Keil, IAR or CooCox. It depends on the project of course. The listed workbenches are optimal for creating software for specific devices (like game periphery) with minimal (or no) GUI. But if you need to develop an embedded application with a GUI that could be ported to another platform then it is highly recommended that you use a cross-platform framework.
Also there are some other benefits of applying a cross platform framework to a project (and the Qt framework in particular):

  • Desktop and Mobile platforms become less overwhelming
  • Many decisions are already made for you: operating system, native API, available toolchains. For example:
    • Qt Virtual Keyboard
    • Full onscreen keyboard solution
    • Customized styling
    • Handwriting Support
    • Asian input methods
  • Impractical to write every line of code
  • Not all hardware has open specs (like GPU or Wireless devices)
  • A lot of general purpose portable tools like:
    • A graphics tool kit (Cairo, etc.)
    • Scalable text renderers (Freetype, etc.)
    • Non trivial text layouts (harfbuzz, etc.)
    • Sounds playing (ALSA, etc.)

Qt Use in the Internet of Things (IoT)

It is estimated that 95% of today’s embedded systems are created with C/C++, and that this will not significantly change in the foreseeable future. The Qt framework is ready to work with IoT devices and represents many high-level APIs for creating the engine of an IoT gateway.

  • Qt Sensors API provides access to sensor hardware like accelerometers, compasses, gyroscopes and more via QML and C++ interfaces. The Qt Sensors API also provides a motion gesture recognition API for devices.
  • Qt Positioning
    • Get different kinds of positioning information such as your position on a map or area-based monitoring via QML and C++ interfaces.
    • Qt Location API helps you create viable mapping solutions using the data available from some of the popular location services.
  • Bluetooth API provides connectivity between Bluetooth enabled devices and supports Bluetooth LE development for client/central role use cases.
  • Cloud computing resources as the backend of an existing Qt application or create new Qt based services and applications that use e.g. cloud storage.

Images are used in the article: pbs.twimg.com, qt.io.

As always, feel free to contact us for a consultation!

One thought on “Qt for Embedded Systems

  1. Mridula

    The blog is well written and the points are illustrated in very simple language. I too agree with the point that it is not beneficial to use traditional approach. Cross platform implies development of software in one platform and running it on other platform.


Leave a Reply

Your email address will not be published. Required fields are marked *