Cross-platform development has taken on a whole new level of importance. The impetus is staggering. Developing and publishing new embedded software is a huge undertaking, one which software publishers would like to minimize. For low-cost widgets, controlling costs is vital.
The holy grail of nearly every development team is to develop and maintain one code base that does not require modifications to operate on a processor or hardware platform architecture. Recently, Intel Embedded Innovator newsletter and magazine featured two relatively new offerings in this area: Adobe’s AIR and Nokia’s QT products.
Although a substantial number of my Software and Tools blogs have focused on Real Time Embedded Systems, not all embedded software is realtime. Adobe AIR and Nokia QT focus on embedded applications development, primarily for mobile devices. Naturally, most mobile devices today include a cellular telephone as part of the package, but that is quickly becoming just a part of the offering and not the entire reason for choosing a compatible mobile device. Some of the newer mobile devices sell not because they are phones, but because of everything else they can do.
Nokia’s Qt (pronounced cute) product stands in contrast with AIR. Qt is also a free cross-platform standard. But the two products diverge quickly: Qt provides an application and User Interface (UI) framework based on C++. Qt applications can run on a variety of platforms including Microsoft (1) Windows and Linux.
Qt documentation shows programmers how to:
- http://doc.qt.nokia.com/4.7/unix-signals.html Call Qt Functions From Unix Signal Handlers
- Develop Qt applications for any supported Platforms
- Use ActiveX in Qt
- Program Qt for Embedded Linuix Classes
- Program using Qt for Embedded Platforms http://doc.qt.nokia.com/4.7/qt-embedded.html
- Use the qtmail Library
- Anticipate Windows System Specific issues
- Understand Supported Platforms nuances
One of the significant differences between AIR and Qt is hinted at by the last item in the above list. Where AIR does not require modification to application source code for each new platform, Qt does require modification.
Let’s look at some examples of Qt code from http://doc.qt.nokia.com/4.7/widgets-movie.html :
movieLabel = new QLabel(tr("No movie loaded"));
connect(movie, SIGNAL(frameChanged(int)), this,
connect(fitCheckBox, SIGNAL(clicked()), this, SLOT(fitToWindow()));
connect(frameSlider, SIGNAL(valueChanged(int)), this,
This code is straight forward – once you know what the classes do. Qlabel is a Qt class, as are Qwidget and Qmovie. For example, Qmovie is a class for playing a movie with QImageReader. Movies in this case are simple animations without sound. There are other classes for playing movies with sound. Qt has hundreds of classes serving a myriad of useful tasks. But with completeness comes complexity. The list of classes is staggering; becoming proficient in the use of all these classes is a significant undertaking. Programmers are not limited to the predefined classes. As with any C++ program, custom classes may be defined and used in the usual manner.
Qt does not create a single unified interface that homologates all different platforms. Instead, programmers must use a macro processing facility to select between different platform code bases. By comparison, AIR does unify the underlying platform hardware definitions so that one code works on all supported hardware platforms.
Roving Reporter (Intel Contractor)
Intel® Embedded Alliance