Summer Grab Bag

Summer Grab Bag

By Jeff Tranter

It's summertime here in the Northern hemisphere, and many people are on vacation (I just got back from a week off, myself). Despite that, we are very busy at ICS with consulting projects and preparing for the upcoming Qt Developer Days (1) conferences to be held in Berlin and San Francisco this year. Given the lack of time, this blog post is going to be a grab bag of updates to earlier blog posts, with lots of links to more information.

The Raspberry Pi (2) continues to be very popular, both as a platform for education as well as embedded computing. To better support the embedded market, the Raspberry Pi Foundation now offers the Compute Module (3), a Raspberry Pi in a more flexible form factor intended for industrial applications. Most recently, we saw the launch of the Model B+ (4) , which offers a number of new features and improvements while remaining software compatible with the original Raspberry Pi model B. A model A+ is expected later this year. In a recent webcast about the Model B+, it was mentioned that an official Raspberry Pi LCD display and touchscreen is in the works. While there are already many third party displays, it will be good to see an official one.

In a blog post last November, we described how to build Qt 5 with Wayland on the Raspberry Pi (5). Unfortunately, the latest version of QtWayland (6) no longer builds with the older version of Wayland in the Raspbian Linux distribution. There are plans to support Wayland as the standard display server on the Raspberry Pi in the future via the new Maynard Desktop (7), so I am confident that this will all work out of the box before too long (and should further improve graphics performance on the Raspberry Pi).

We've posted here several times about the Yocto embedded framework (8). The Qt 5 recipes for Yocto (9) have seen significant development effort recently. The KDE Frameworks 5 (10) is also being set up to build on Yocto (11), so these useful add-ons to Qt can be used on embedded platforms as well as desktop.

I posted a while back about the Qt X11 Extras module (12). Since then, Mac Extras (13) and Win Extras (14) modules have officially become part of Qt releases, and most recently an Android Extras (15) module as well.

The success of the Raspberry Pi has attracted the attention of other hardware vendors, including Intel and even Microsoft (16). Many are ARM-based but some are also x86 compatible. There are even some Raspberry Pi clones, and boards that combine a Linux-based board with an Arduino compatible controller. The list of boards (17)on the market (18) is large and growing every day. This is all good news for embedded developers and people wanting to learn embedded development.

As a follow-up to Qt Multimedia with QML (19), a new feature in Qt 5.3.0 is the QCameraInfo (20) class. This C++ class (there is no corresponding QML element yet) allows you to get information about the available cameras on a system. Here is the source code for a small but complete example program.

#include <QCamera>
#include <QCameraInfo>
#include <QDebug>
#include <QList>
int main()
qDebug() << "Available cameras:";
QList<QCameraInfo> cameras = QCameraInfo::availableCameras();
foreach (const QCameraInfo &cameraInfo, cameras) {
qDebug() << "  Device name:" << cameraInfo.deviceName();
qDebug() << "  Description:" << cameraInfo.description();
qDebug() << "  Orientation:" << cameraInfo.orientation() << "degrees rotation";
switch (cameraInfo.position()) {
case QCamera::UnspecifiedPosition:
qDebug() << "  Position: unknown";
case QCamera::BackFace:
qDebug() << "  Position: back";
case QCamera::FrontFace:
qDebug() << "  Position: front";
qDebug() << "Default camera:";
if (QCameraInfo::defaultCamera().isNull()) {
qDebug() << "  none";
} else {
qDebug() << "  " << QCameraInfo::defaultCamera().deviceName();
return 0;

The class is supported on multiple platforms including Android. Here is the output on a Linux laptop:

Available cameras:
Device name: "/dev/video0"
Description: "Laptop_Integrated_Webcam_E4HD"
Orientation: 0 degrees rotation
Position: unknown
Default camera:

Here is the output on an Android Nexus 7 tablet:

Available cameras:
EGL 1.4 QUALCOMM Build: I0404c4692afb8623f95c43aeb6d5e13ed4b30ddbDate: 11/06/13
Device name: "back"
Description: "Rear-facing camera"
Orientation: 270 degrees rotation
Position: back
Device name: "front"
Description: "Front-facing camera"
Orientation: 90 degrees rotation
Position: front
Default camera:

That's all for this time. Have a good summer, and if you get the opportunity to take any vacation, enjoy yourself.


  1. Qt Developer Days web site, accessed August 1, 2014 
  2. Raspberry Pi project web site, accessed August 1, 2014,
  3. Raspberry Pi Compute Module, accessed August 1, 2014,
  4. Raspberry Pi Model B+, accessed August 1, 2014,
  5. Building Qt and Wayland on Raspberry Pi, accessed August 1, 2014,
  6. QtWayland Project, accessed August 1, 2014,
  7. Preview the Upcoming Maynard Desktop, accessed August 1, 2014,
  8. Yocto Project web site, accessed August 1, 2014,
  9. Qt 5 Yocto Recipes, accessed August 1, 2014,
  10. KDE Frameworks 5 API Documentation, accessed August 1, 2014,
  11. KF5 in Yocto, blog post, accessed August 1, 2014,
  12. QtX11Extras Module, accessed August 1, 2014,
  13. QtMacExtras Module, accessed August 1, 2014,
  14. QtWinExtras Module, accessed August 1, 2014,
  15. QtAndroidExtras Module, accessed August 1, 2014,
  16. Microsoft's Sharks Cove, PC World article, accessed August 1, 2014,
  17. List of 39 Low Cost Linux-Friendly Boards and Products, accessed August 1, 2014,
  18. Top 10 Open Source Linux Boards Under $200, accessed August 1, 2014,
  19. Qt 5 multimedia Qml Elements, blog post, accessed August 1, 2014,
  20. QCameraInfo Class API Documentation, accessed August 1, 2014,