Monday, November 11, 2013 - 13:21 ">  •  By Jeff Tranter  •  Qt, Developer Days, Conference
We've just returned from the Qt Developer Days San Francisco conference last week and I wanted to share a brief report on some of the highlights of the show. This was the tenth annual Qt Developer Days. The conference is traditionally held annually both in Europe and North America and this year the North American show was at the San Francisco Airport Marriott Waterfront. As in Berlin, the attendance of the show was up over last year. Typically, the North American show has slightly lower attendance than the European show, as more Qt developers are located in Europe. The attendees in North…
Monday, October 28, 2013 - 08:59 ">  •  By ICS Development Team  •  Qt, QML, C++, Cascades, BlackBerry
In this post we'll look briefly at the Model View support from QML in BlackBerry 10's Cascades Framework, including an example program. The Cascades framework lets you create UIs for the BlackBerry Application Platform with relative ease. This Qt based framework can be used to develop native applications for the BlackBerry 10 mobile platform. It supports development in C++ and/or QML. Recently, I have been using Cascades for development of some mobile applications and I wanted to show an example of the support it offers for data management using Model/View…
Tuesday, October 15, 2013 - 09:18 ">  •  By Jeff Tranter  •  Qt, QML, Developer Days, Conference, Berlin
We've just returned from the Qt Developer Days European conference last week and I wanted to share a brief report on some of the highlights of the show. ICS CEO Peter Winston: Introducing the First Keynote Speaker in Berlin This was the 10th annual Qt Developer Days. The conference is traditionally held in Europe and North America and this year the European show was at the Cafe Moskau in Berlin, the same location as last year. The attendance of the show has increased over last year, a clear sign that Qt is healthy. I conservatively estimated there were over 600 people…
Monday, September 30, 2013 - 09:11 ">  •  By Jeff Tranter  •  Qt, QML
With Qt Developer Days 2013 rapidly approaching, a number of Qt developers are busy preparing presentations for the conference, myself included. I thought it would be timely to give an overview of the QML Presentation System. Introduction The QML Presentation System is a QML-based piece of software that allows you to quickly write presentations in the QML language and display them on any desktop system that supports Qt 5. Installation The software is hosted at qt.gitorious.org here. You can check out the code from git by running git clone git@gitorious.org:qt-labs/qml-presentation-…
Monday, September 16, 2013 - 09:34 ">  •  By ICS Development Team  •  Qt, QML
The topic of application architecture rarely comes up in the context of Qt, because as Qt developers we tend to be more interested in the classes and objects (trees) than the application as a whole (forest). However, the architecture of a Qt Quick application is the difference between pain and joy. A good architecture makes C++ and QML integration seem natural, while a poor and muddled architecture makes it an exercise in frustration. Multilayered Architecture A multilayered software architecture is one that organizes different responsibilities into layers. Each layer has a broad role…
Thursday, August 29, 2013 - 09:27 ">  •  By Jeff Tranter  •  Qt, C++
Introduction With most C++ compilers now providing good support for the latest language standard, C++11, let's look at some of the new language features that are particularly useful for use in Qt programs. I won't cover all the new C++11 features; just some that in my experience are particularly useful when programming with Qt. See the references at the end if you want more details. Enabling C++11 Compiler Support Some compilers need command line options to enable C++11 support. If you are using qmake as your build system, adding the following line to your qmake project file should produce…
Monday, August 19, 2013 - 09:45 ">  •  By Jeff Tranter  •  Qt, QML
Introduction Qt 5 introduced a new set of multimedia APIs. Both C++ and QML APIs are provided. In this blog post, I will give an overview of the QML APIs for multimedia. Multimedia QML Elements The QtMultimedia module provides the following QML components: Name Description Video A convenience type for showing a specified video Audio Add audio playback to a scene MediaPlayer Add media playback to a scene Camera Access viewfinder frames and take photos and movies CameraCapture An interface for capturing camera images…
Friday, August 2, 2013 - 15:43 ">  •  By Jeff Tranter  •  Widgets, QML
Introduction Qt 5.1 introduces a new method in the QWidget class called createWindowContainer(). It allows embedding a QWindow (such as a QQuickView) into a QWidget-based application. This allows combining both QML and widgets in the same application, something that was not possible with Qt 5.0. The new method is well documented (see References at the end of the posting) but I did not see any complete compilable examples of using it, so I thought I would present one here. Details The new API provides the following static method: QWidget *QWidget::createWindowContainer(QWindow *window…
Friday, July 26, 2013 - 12:58 ">  •  By Jeff Tranter  • 
In this blog post, we'll take a very brief look at the Qt Installer Framework. Introduction The Qt Installer Framework allows you to create cross-platform graphical software installers. It supports the desktop platforms supported by Qt: Windows, Mac OS X, and Linux. It allows you to easily create the standard type of graphical installers with multiple pages that guide a user through the process of installation. It also supports uninstalls and the ability to update components. You can customize the installer pages to support a special user interface for user entered options and you can…
Monday, July 22, 2013 - 11:57 ">  •  By ICS Development Team  • 
This year's Qt Contributors Summit was held in conjunction with KDE Akademy in Bilbao, Spain. The event was well attended by engineers from many diverse organizations that share a vital interest in the ongoing development of the Qt libraries. Lars Knoll, chief maintainer of Qt from Digia, opened the two-day workshop with an overview of the state of Qt in general. He outlined that the release of Qt 5.1 had brought many improvements in stability and stated consequently; commercial customers are beginning to port Qt 4 based code to Qt 5 with great success. Lars further explained that the…
Friday, July 19, 2013 - 13:24 ">  •  By Jeff Tranter  • 
  Introduction Qt Quick's QML language makes it easy to do many things, especially fancy animated user interfaces. However, some things either can't be done or are not suitable for implementing in QML, such as: Getting access to functionality outside of the QML/JavaScript environment. Implementing performance critical functions where native code is desired for efficiency. Large and/or complex non-declarative code that would be tedious to implement in JavaScript. As we'll see, Qt makes it quite easy to expose C++ code to QML. In this blog post I will show an example…
Friday, July 12, 2013 - 13:34 ">  •  By ICS Development Team  •  Qt Designer, Qt
This blog post will describe how to write a custom Qt widget and how to integrate it into Qt Designer so that you can drag and drop it onto your designs. It will also provide an understanding of important differences between Qt 4 and Qt 5 when it comes to creating designable widgets. The example we will work through is an LED (Light Emitting Diode) object. It is designed to be a realistic representation of the real thing: The diameter of the LED is measured in millimeters (like real LEDs) and can be any color you want (unlike real LEDs). The on/off state can be changed programmatically…
Friday, June 28, 2013 - 10:53 ">  •  By ICS Development Team  •  C++
IntroductionAs promised, here is a follow-up to An Introduction to Clang. I mentioned in that posting the cool thing about Clang is that it is library based and offers public APIs that allows one to access information about a C or C++ program with relative ease. In this post we will work through an example using Clang's API to write our own "baby IDE" that parses C and C++ code and performs syntax highlighting.Clang consists of a number of different libraries and of primary interest at this time, is libclang. Clang's evolution has been rapid so most of the libraries…
Friday, June 21, 2013 - 11:39 ">  •  By Jeff Tranter  •  Qt, OpenGL, QML
Introduction This blog posting gives an introduction to the Qt Graphical Effects module which is available in Qt 5. As of Qt 5.1 the module offers 25 QML components which support effects in these categories: blend, color, gradient, distortion, drop shadow, blur, motion blur, glow and mask. List of Effects Here is the list of effects provided as of Qt 5.1: Effect Description Blend Merges two source items by using a blend mode. BrightnessContrast Adjusts brightness and contrast. ColorOverlay Alters the colors of the source item by applying an…
Friday, June 14, 2013 - 12:34 ">  •  By Jeff Tranter  • 
Introduction The QtSensors module is a new feature in Qt 5.1. It provides access to sensor hardware from QML and C++. Sensors are common on embedded devices such as smart phones and include hardware like an accelerometer, compass and tilt sensor. The QtSensors API also provides a motion gesture recognition API. Back ends are provided for Blackberry 10, Android, Linux, iOS, Sensorfw (an open source sensor framework and daemon originally developed for MeeGo) and some generic back ends that provide emulation of sensors that are not supported on the platform. Currently the best supported…
Friday, June 7, 2013 - 11:33 ">  •  By Jeff Tranter  • 
Introduction Qt Quick and the QML language are ideal for developing touch screen user interfaces. However, the standard QML visual elements are quite low level, offering building blocks like rectangles, for example. For mobile and embedded applications you often have to build up your own components even for things as simple as a push button. This can mean reinventing the wheel on each project. Nokia developed the Qt Quick Components for Harmattan and MeeGo but these platforms are no longer being supported by Nokia. For desktop it is even more challenging as there are no QML elements…
Wednesday, June 5, 2013 - 12:50 ">  •  By Jeff Tranter  • 
Introduction QtSerialPort is a Qt module that provides support for serial ports such as those that follow the RS-232 standard. Serial port modules for Qt have existed for some time, going back at least as far as QExtSerialPort under Qt version 2, but none of them were officially part of Qt. QtSerialPort originated from the third-party library QSerialDevice and was subsequently made part of the Qt project. It officially becomes part of Qt with the 5.1.0 release. QtSerialPort supports Qt versions 4 and 5. With versions of Qt prior to 5.1.0 you can get the source code separately from gitorious…
Friday, May 17, 2013 - 08:46 ">  •  By ICS Development Team  •  Raspberry Pi, Embedded
This is a HOW TO guide for building Qt 5 for the Raspberry Pi, and building and deploying Qt 5 apps using Qt Creator. This guide will be using Raspbian "Wheezy", a Debian based distro designed for the Raspberry Pi. This guide also assumes the use of Linux or UNIX on the workstation side. Note: Throughout this guide the symbol "$" denotes a command prompt on the host workstation, and "pi$" denotes a command prompt on the target Raspberry Pi. Getting started Downloads You will need the following downloads: The latest Raspbian "Wheezy" version of Debian Linux [2013-02-09] http://www.…
Friday, May 3, 2013 - 12:03 ">  •  By Jeff Tranter  • 
This is the first in a series of blog postings that will discuss some of the notable new features in the Qt 5.1 release. The Qt 5.1 release will contain a new module known as X11 Extras. This module provides some platform-specific features for Qt on X11-based systems. The module was available earlier as standalone code that you could check out from gitorious.org and build yourself with Qt 5.0. It was considered useful and stable enough to be rolled into the Qt 5.1.0 release. The code is licensed in the same way as the rest of Qt (i.e. triple licensed under GPL, LGPL and Commercial…
Monday, April 22, 2013 - 08:51 ">  •  By ICS Development Team  •  Qdatastream, Qt
Introduction When I first started using Qt in 2005, one of the classes that I found the most interesting was QDataStream. It was similar to something I had written many years earlier for standard C++ that performed a similar function but with iostreams. I wanted to cover enough aspects of this topic to make it immediately useful to the reader. As a result this post is a bit on the long side. Some of this is already covered in the Qt documentation for QDataStream. I recommend reading that first. The source code is written to support Qt 4 or 5. QDataStream is a very useful class for…
Friday, April 12, 2013 - 07:48 ">  •  By ICS Development Team  • 
Qt 5.0.0 introduced the QStandardPaths class. This expands on functionality that was in Qt 4 in the QDesktopServices class. The QStandardPaths class provides methods for accessing standard paths on a system such as the location of the user's desktop directory or location of a program executable. The class provides only static methods, so it never needs to be instantiated as an object. I wrote a small Qt-based graphical application that illustrates many of the features of the class. A screen shot is shown below.   Given one of about fifteen location…
Friday, April 12, 2013 - 07:45 ">  •  By ICS Development Team  • 
Introduction A quick trivia quiz: Does Qt use multiple inheritance? If so, how many public Qt classes use it? Does any Qt class directly inherit from more than two classes? Does Qt let you multiply inherit (directly or indirectly) from QObject? If you can correctly answer these questions off the top of your head you're definitely a Qt and C++ guru and can stop reading now. If not, then by the end of this article you will be able to answer these questions and impress your colleagues with your knowledge. What is Multiple Inheritance? Multiple inheritance is a feature of some object-…
Friday, April 12, 2013 - 07:42 ">  •  By ICS Development Team  •  C++
In this blog post I will be writing about some of my experiences with clang. What is clang? It is a front end to the LLVM compiler and is designed to compile C, C++, Objective-C, and Objective-C++ to machine code. The LLVM Project "is a collection of modular and reusable compiler and toolchain technologies," meaning that you could use LLVM to create a compiler for just about any language you'd like, including your own invented language, were you so inclined. The LLVM core libraries include things such as code generation for a number of CPUs and optimization technology. As my purpose is…
Tuesday, February 26, 2013 - 13:44 ">  •  By Jeff Tranter  • 
QMimeDatabase and QMimeType are new classes introduced in Qt 5. MIME, which stands for Multipurpose Internet Mail Extensions, is an Internet standard for identifying file formats. The MIME standard was originally created to support attachment of files in e-mail messages. A good reference for MIME can be found here. The QMimeDatabase class returns information about the database of MIME types on a system. Instances of the QMimeType class describe the type of a file or data. I wrote a small graphical Qt demo application that illustrates these classes. It allows the user to enter or browse…
Tuesday, February 26, 2013 - 13:41 ">  •  By Jeff Tranter  • 
QScreen is a new class introduced in Qt 5.0.0 that returns information about screen properties, where screen here refers to a display, such as a monitor or LCD panel. [Update: It was pointed out that Qt 4 has a class named QScreen. However, the QScreenclass in Qt 4 was entirely different from the one in Qt 5 with different APIs and used for a different purpose. So I really consider them to be different classes.] It can be used to allow your application to handle different screen sizes, multiple screens, or calculate the physical size of items on the screen. In Qt 4 you could…
Wednesday, January 30, 2013 - 12:36 ">  •  By Jeff Tranter  •  Qt, PhoneGap
This week we kicked off the PhoneGap for Qt 5 project. The goal of the project is to develop a complete version of the PhoneGap open source mobile development framework for the Qt 5 platform. This is going to be an exciting project and we hope it will help accelerate the adoption of Qt 5, making it easy to run HTML5 applications on devices that run Qt 5. This week we focused on some startup tasks. We assembled the project team at ICS, with a mix of people with Qt and web development experience. We joined the PhoneGap developer mailing list. I put some…
Wednesday, January 30, 2013 - 12:36 ">  •  By Jeff Tranter  •  Qt, PhoneGap
This week was a little slow as some people were away for the holidays. The new callback-qtimplementation by Viras got committed to github and we are now working with that version. Much of the week has been spent building Qt5. The source code for Qt5 is huge - several gigabytes. It takes considerable time to check out the code even with a fast Internet connection. Some reasons for this are the size of Webkit, all of the new modules, mobility functions, unit tests, and the files related to git. There are some good instructions for building Qt5 here. The version of WebKit in Qt5…
Wednesday, January 30, 2013 - 12:35 ">  •  By Jeff Tranter  •  Qt, Raspberry Pi, PhoneGap, Cordova
This week was another slow week as many people were off part of the week due to New Year's or extended holidays. PhoneGap, recently renamed to Apache Callback, is now being renamed as Apache Cordova. There is discussion on the mailing list about where the code repositories will reside. It may be on github or the Apache git or both. There are also discussions on what Wiki to use. We're waiting for the dust to settle before we can commit any code changes. On the Qt mailing list, release plans for Qt 5 are starting to shape up. To meet the goal of a release for this…