Looking for a New Year's resolution for 2016?
Official support for Qt version 4 came to an end in December 2015. Qt version 5 first came out in 2013 and is currently at version 5.5.1, with the 5.6.0 release coming early this year. Qt 5.6.0 will be the first LTS (Long Term Support) release, with a commitment to be supported for three years.
If you are still using Qt 4, it really is time to start thinking about migrating your code to Qt 5.
In a previous blog post (1), written almost exactly three years ago, I discussed my experiences porting about 14,000 lines of Qt widget-based…
The Qt 5.6.0 release, coming in early 2016, includes a number of new modules and classes. I plan to cover a number of these in a series of blog posts. In this first post, we'll start with one of the simpler classes in Qt 5.6.0: QVersionNumber.
Basics
Part of the Qt core, it provides a facility to manage version numbers. In this context, version numbers are defined as an arbitrary number of segments, which are numbers separated by dots or periods. A version can also have an arbitrary suffix added to the end.
The following are examples of valid version numbers for the QVersionNumber…
In this blog post, we'll continue the series on Qt Tips and Tricks. This time I'll present some general advice on working with Qt, based on the experience of ICS developers.
Bug Tracker
If you are having a problem with Qt, the Qt Bug Tracker (1) is a useful resource to check for known bugs or other issues in Qt. It is also the place to report new bugs you find in Qt.
If you are seeing strange behavior, it might be a legitimate bug in Qt rather than an error on your part. Some of the newer Qt modules, especially those at a technical preview state, may contain bugs. If you think you…
In this blog post, I'll present a few tips and tricks for using Qt of which you may not be aware. These are small topics that I didn't feel justified an entire blog post of their own and were collected by polling the ICS Qt consulting team.
Qt Extras
There are platform-specific features available in the Qt "Extras" modules: Android Extras (1), Mac Extras (2), Win Extras (3) and X11 Extras (4).
While it is always best to avoid platform-specific features whenever possible, these modules allow you to use some features of a specific platform from within Qt, avoiding the need to call the…
Wednesday, September 30, 2015 - 15:42
">
•
By Jeff Tranter
•
Qt, QML, Best Practice, OpenGL, Embedded
Inspired by Halloween, I'd like to present a list of ten "scary" mistakes using Qt. Based on the wide experience of ICS with Qt consulting projects, I have provided a list of errors that can doom any project.
1. Waiting too long to test on hardware
One of Qt's strengths is its cross-platform support and often when developing for embedded platforms it means that you can start development on a desktop system and not need to wait until your embedded hardware is ready. However, it is important to test your code as soon as possible on the embedded hardware, either the…
Monday, September 28, 2015 - 15:28
">
•
By Jeff Tranter
•
Qt, World Summit, Developer Days, Conference
I recently returned from the Qt World Summit conference and wanted to share a brief report on some of the highlights of the show.
As in previous years, the event was held in Berlin, Germany and was in the same venue as last year, the Berlin Congress Center. It is conveniently located close to the historic Alexanderplatz public square and transport hub in the central Mitte district of Berlin. For those who came a day or two early, you could catch the tail end of Oktoberfest!
There were some significant changes this year. Whereas for the last three years the Qt Developer Days conferences were…
Sometimes an application needs to use different assets, such as graphics images or QML files, depending on the platform that the application is running on.
One way to do this is with conditional code at compile time using the C++ pre-processor (i.e. #ifdefs). It can also be done with conditional code that loads different files at run-time, depending on the platform.
Qt provides a nice facility to handle this in a more elegant way: file selectors. In this blog post. I'll look at what Qt provides, for both C++ and QML, and show a simple but complete program example.
QFileSelector
At…
In this blog post, we'll take a brief look at one of the newest Qt modules, Qt3D, which was introduced in Qt 5.5.0.
What is Qt3D?
Qt3D is a new Qt module that provides support for 2D and 3D rendering. It also provides a generic framework for supporting simulations that go beyond just rendering, and can include features like physics, audio, collision detection, artificial intelligence and path finding.
It has APIs for both C++ and Qt Quick (QML) and uses OpenGL as the underlying technology.
Current Status
Qt3D has been in development for some time, and its scope has expanded, in part…
In Part 1 of this series we looked at some of the programming languages other than C++ that could be used with the Qt framework. Let's continue our discussion, looking at some more languages.
OCaml
Caml is a dialect of the ML programming language family. OCaml, originally known as Objective Caml, extends the Caml language with object-oriented constructs.
Lablqt 1 is a project that aims to support using QML with back end code written in OCaml rather than C++. It supports Qt 5. At the moment, it appears to be more of a proof of concept suited to small applications, and will…
By Jeff Tranter
Most Qt developers use C++ (the language that Qt is written in), often in association with QML. There are however, other programming languages that can be used with Qt. In this blog post, we'll look at some of the alternative language options.
Rationale
You may wonder why anyone would use a language other than C++, as it is the most well supported language for Qt programming. Some possible reasons include a personal preference based on one's knowledge or experience, or a particular programming language may be a better fit to the problem domain at hand.…
This blog post presents a short example program that illustrates how to use OpenGL and Qt in a scene graph. The two main goals are to show how the scene graph can be used, and more importantly, how to incorporate your own OpenGL code as part of the scene graph (as opposed to overlaying them).
The code is relatively short and commented so rather than describe it here in detail, I suggest you build and run it, and then study the code, possibly making some changes of your own. The complete source code can be downloaded from here.
The example will build with recent versions of Qt 5 on…
In this blog post, the last in the series, I'll cover the remaining Qt command line tools as there are only a few programs we have not already discussed.
xmlpatterns and xmlpatternsvalidator
These two XML-related tools are for working with Qt's XQuery support. XQuery is a query and functional programming language for querying and transforming collections of structured and unstructured data.
The xmlpatterns command is a tool for running XQuery queries. The xmlpatternsvalidator program is used for validating Qt XML Patterns.
As a piece of useless trivia, xmlpatternsvalidator ties with…
In the next installment of this blog series on the lesser-known Qt commands, we'll look at the QML-related tools that come with Qt 5.
qml
This program is the so-called QML tooling, which allows running QML files directly like a script, much like UNIX shell scripts or Python programs. I've covered this specific topic before and and refer you to that previous blog post 1 for more details.
qmlbundle
Qmlbundle is a tool that allows combining resources, like QML and JavaScript files and images, into a single file. The idea is to simplify deployment by combining multiple source files into one…
In this next installment of our blog series on lesser-known Qt commands, we'll look at four tools related to documentation: qdoc, qhelpgenerator, qcollectiongenerator and qhelpconverter.
Qdoc
Qdoc1 is the tool used to generate the developer documentation for the Qt Project. It is not specific to Qt, and can be used to create documentation for other projects or applications.
Similar to tools like Javadoc2 and Doxygen3, it works by extracting structured comments from source files and using them to generate documentation in HTML or other formats.
The…
Thursday, June 4, 2015 - 14:25
">
•
By ICS
•
Smartphone, in-car experiences, User Experience, touchscreen interfaces, touchscreen, IVI
Automakers have long strived to make their in-car experiences unique and distinctive: not just in an effort to distinguish themselves from their competitors, but also to distinguish their low-end car models from their luxury models. The low-end to high-end distinction has been important to them for two reasons:
The in-car experience is an integral part of the automakers’ customer loyalty strategy and customer upgrade strategy: if you like the car you own now you are more likely to favor that brand again when you trade in or trade up.
The auto industry makes most of its profit from their…
In this post, we'll look at Boost::Log, a facility of the Boost C++ libraries that makes it easy to add logging to applications.
QMessageLogger 1 was introduced in Qt 5.0 as a means of providing a framework for logging application messages. While QMessageLogger is useful as a lightweight logging tool when in debug mode, it fails to provide the flexibility and features necessary to suit many application requirements.
Boost::Log V2 2 was first released with Boost 1.54 and provides a flexible, robust framework that is capable of supporting a variety of application logging…
Friday, May 22, 2015 - 14:30
">
•
By ICS Development Team
•
Qt, C++, localization, internationalization
In this blog post, we will show an example of how to support dynamic language selection in an application using Qt. By "dynamic", I mean that the application can change the displayed language from within the application at run-time, rather than picking it up from the locale once on startup.
Text or ID-Based Translations?
In this example we will be using the text identifier translation mechanism, which may not be familiar to you if you have only used Qt's more common string-based translation method using the tr() method.
The ID-based method (1) is described as an "industrial…
Tuesday, May 19, 2015 - 13:51
">
•
By ICS Development Team
•
Internet of Things, IoT, user interface, MRAA, Software Development
Integrated Computer Solutions (ICS) is known for its expertise in user interface design and software implementation for embedded, mobile, desktop and interactive kiosk systems. Our work is visible in everything from smartphones to vending machines and medical equipment to vehicles of all sizes. What has less visibility – literally – is our low-level work with hardware, operating systems and device drivers. A recent project related to the Internet of Things gave us a chance to highlight some of these capabilities.
Internet of Things, or IoT for short, is the latest thing in high tech…
According to the book C++ GUI Programming with Qt 4 (1), the first public version of Qt was uploaded to the ftp site sunsite.unc.edu on May 20, 1995. This was the first public release of Qt and was identified as version 0.90. It was announced six days later on the comp.os.linux.announce Usenet newsgroup.
That was 20 years ago today. In honor of that anniversary, I downloaded the oldest Qt source code I could find at download.qt.io, version 1.41 (2). I remember using Qt of this vintage, around 1999. At that time I was working at Corel Corporation on Corel Desktop Linux which was based on…
The Raspberry Pi 2 computer, released in February 2015, is the latest generation of Raspberry Pi hardware.
It is a significantly faster machine than the original Raspberry Pi, with a new Broadcom BCM2836 system on a chip that has a quad-core ARM Cortex A7 CPU running at 900 MHz. The GPU is a VideoCore IV dual-core GPU, the same as on the original Raspberry Pi.
RAM has been increased from 512 MB to 1 GB, and the number of USB ports from two to four.
The video support is unchanged, although the composite video output is now provided via a 3.5mm TRRS jack that also provides audio out, rather…
Intel® In-Vehicle Solutions Proof of Concept - ICS High Level Design Document
Connected Technology
Demand for connected devices in automobiles is accelerating as mobile ecosystems are maturing. The ability for automakers to differentiate in an increasingly competitive environment depends on their ability to integrate a smart in-vehicle infotainment system (IVI) strategy and deliver a fully connected lifestyle to consumers. The manufacturers who succeed at providing an open, scalable and easily configurable automotive IVI will be the future market leaders.
Fast. Easy. Smart.…
Continuing with our series of blog posts on some of the lesser known Qt commands, this time we will look at some tools related to Qt and D-Bus.
D-Bus (1) is an inter-process communication (IPC) system that allows multiple concurrently running computer programs to communicate.
It was developed by the freedesktop.org project to standardize services provided by Linux desktop environments. D-Bus is free software and runs on Linux and most POSIX-compatible operating systems, and a port to Windows exists. While originally developed for desktop systems, it is also commonly…
Friday, March 6, 2015 - 14:39
">
•
By Jeff Tranter
•
Qt, QML, quick reference, reference card, cheat sheet
I am a strong proponent of quick references or "cheat sheets" as an aid for recalling often-used information. In my career, I have created many work-related reference cards for colleagues and for my own personal use as well as for hobbies such as electronics and retro computing.
Last year I put together a one page double-sided QML quick reference. ICS gave out hardcopies of the quick reference to Qt Developer Days 2014 attendees in Berlin and San Francisco.
I recently updated it for the latest Qt 5.4.1 release. Printable Adobe Acrobat (PDF) versions in US…
Every Qt developer should be familiar with the common tools like qmake, Qt Designer and Assistant, but looking in your Qt installation's bin directory will reveal a few more programs there. In this and future blogs, we'll look at some of the lesser known Qt development tools.
First, let's review a list of the tools for which you should be familiar. A few, like moc, rcc, and uic may be less familiar to you if you primarily let qmake or your IDE take care of building software, but the tools shown in the table below are ones that most Qt developers use on a regular basis.
Table 1…
Tuesday, February 10, 2015 - 10:49
">
•
By ICS Development Team
•
Software Development, Medical, FDA, Qt, QNX
Software development in general follows a particular flow. This article describes the software development process for medical device products and some of the notable differences within. Some examples of medical device products include everything from user interface design for image guided surgical tools, intraoperative devices, CT/MRI (as shown in Figure 1) and fluoroscopy imaging systems, surgical robotics and devices for tumor ablation.
Figure 1. MRI Scanner with head coil. …
Thursday, January 22, 2015 - 16:46
">
•
By Jeff Tranter
•
Application Analytics, Google Analytics, Qt, QML
A previous blog post (1) described how we've been using Google Analytics at ICS to collect usage information for a Kiosk application. In this second blog post, I'll present more technical information about how to use Google Analytics from C++ code and how Qt makes this very easy to implement.
Administration of Google Analytics (2) is done through a web browser. Once you've signed up, you need to create a project. You will be given a unique tracking code to use when recording events so that you and others can see the data from the web interface.
The Google Analytics Measurement Protocol…
There is often a desire of some companies to monitor usage of specific software applications to improve business over time. Reports and dashboards that provide visual representations of usage data can be used to inform product development, establish product value and influence business strategy. Google Analytics (GA), while originally intended for web analytics, offers a number of advantages as a framework for monitoring products with the use of Qt-based applications.
Google Analytics event tracking features are sufficiently flexible to capture usage information for most applications.…
Tuesday, December 23, 2014 - 11:56
">
•
By Jeff Tranter
•
Qt, Embedded, 2014, IVI, Raspberry Pi, OpenGL
As the year draws to a close, I thought it would be good to take a look back at some of the major events of the Qt world in 2014.
Qt is now on a regular schedule of two major releases per year. We saw Qt 5.3.0 (1) come out in May and Qt 5.4.0 (2) in December. More minor releases occur, as needed, between the major releases.
Qt 4 continues to see maintenance releases with a Qt 4.8.6 (3) coming out this year, and a 4.8.7 release planned in the first quarter of 2015. As announced at Qt Developer Days, Qt 4 will be officially supported for one more year. If the experience of Qt 3 is any…