Qt 4.0 was released in June 2005, a full seven years ago. During that time, Qt has evolved a lot, making it better suited for mobile development. However, it was obvious that major changes were needed to better address the different needs of the Qt community and to finally make Qt a first-class citizen on mobile devices. The vision of Qt 5 was communicated in a blog post by Qt Chief Maintainer Lars Knoll in May 2011  make better use of the GPU, allowing the creation of smoother and more fluid applications, even with limited resources, using Qt Quick and JavaScript as the primary building blocks. Even though Qt Quick provided a good development experience as of Qt 4.7, some fundamental changes were needed to ensure smooth, large-scale Qt Quick-based applications on embedded devices with limited resources. Additional important aspects of the vision were to provide better integration with Web content into any Qt application, but at the same time, acknowledge that some complexities and the amount of code needed to be reduced.



Development of Qt 5

Earlier versions of Qt were mostly developed in-house at Nokia (and previously, Trolltech). But since the launch of qt-project.org, a vibrant community has been participating in development of Qt 5 and many features and patches in Qt 5 (including supported platforms) have been done by the community.

The Qt Project governs the open source development of Qt. It allows anybody wanting to contribute to join the effort through a meritocratic structure of approvers and maintainers. All development is driven by the people contributing to the project.

Architectural Changes

In Qt 5, following major changes were accomplished:

All ports of Qt are based on the Qt Platform abstraction layer (QPA). QPA is the platform abstraction layer for Qt 5 and replaces QWS and the platform ports from Qt 4. Benefits of using QPA are that the architecture is much cleaner where platform dependent code is abstracted and the new abstraction makes it much easier to integrate Qt with new windowing systems.

New graphics architecture. Qt 5 introduces a new graphics architecture for Qt Quick using Scenegraph on top of OpenGL. OpenGL (ES) 2.0 is mandated for this to work. The new architecture makes it easier to integrate OpenGL-based content, such as shader effects, with Qt Quick-based applications. The QWidget-based stack continues to work as in Qt 4.x (based on QPainter), but supported back-ends have been limited to SW rasterization, pixmaps, and images, an OpenGL backend for GL surface,s and a backend for PDF generation and printing. X11 and CoreGraphics are no longer supported.

Modular repository structure. This enables more independent development of Qt modules, but also makes it easier to integrate contributions in the form of third-party modules to Qt. Modularization is also important because it also responds the need to have different requirements supported on desktops and tablets/mobiles.

All QWidget-related functionality is separated into its own library. A continued use of QWidgets is secured, but at the same time,it helps to have a clean architecture in Qt 5 to continue evolution of Qt Quick. Qt Widgets are also ported on top of QPA.

The Structure of Qt 5

Figure 1.

Modules have been split into Qt Essential Modules and Qt Add-on Modules. Essential modules are mandatory in all platforms. Add-on modules can be included optionally in Qt enabled platforms. Add-on modules can roughly be divided into following categories:

Modules that are provided for Qt 4.x compatibility

Modules that have been part of previous Qt mobility releases

Modules that are useful on a limited number of platforms like Qt D-Bus

Modules that are potential candidates to be part of Qt Essential modules in some future Qt release.

Essential Modules in Qt 5 are:

Qt Core: Contains core non-GUI functionality. All modules in Qt rely on this module.

Qt GUI: Extends QtCore with GUI functionality. Includes OpenGL.

Qt Multimedia: Provides audio, video, radio, and camera functionality. Requires GStreamer on Linux.

Qt Network: Provides classes to make network programming easier and more portable.

Qt Qml: qml and Javascript language module for Qt.

Qt Quick: Declarative framework for building highly dynamic, custom user interfaces.

Qt SQL: Qt support for SQL databases.

Qt Test: Classes for unit testing Qt applications and libraries. Note: Needed for conformance testing but not required to be included in the release. No compatibility promised.

Qt WebKit: A new WebKit- based implementation and a new QML API. See the Qt WebKit Widgets in the add-on modules.

You may notice that some modules from Qt 4.8 are no longer part of the essential modules like Qt XML, Qt SVG, QtOpenGL, etc. They have been moved to add-on modules in Qt.

Add-on Modules are:

Qt 3D: A set of APIs to make 3D graphics programming easy and declarative.

Qt Bluetooth: C++ and QML APIs for platforms using Bluetooth wireless technology.

Qt Contacts: C++ and QML APIs for accessing addressbook/contact databases.

Qt Concurrent: High level APIs for writing multi-threaded programs.

Qt D-Bus: UNIX-only library that you can use to perform Inter-Process Communication using the D-Bus protocol.

Qt Graphical Effects: Design neutral visual effects for Qt Quick 2.0.

Qt Image Formats: A set of plugins for additional image formats (TIFF, MNG, TGA, WBMP)

Qt JS Backend: A copy of V8 with additional changes needed for Qt. Used internally by Qt Qml. No public API is offered.

Qt Location: Provides location positioning, mapping, navigation, and place search via QML and C++ interfaces. NMEA backend for positioning.

Qt OpenGL: Classes that make it easy to use OpenGL in Qt applications. Provided to ease porting from Qt 4.x. For new code, use the QOpenGL classes in QtGui.

Qt Organizer: C++ and QML APIs for accessing organizer events (todos, events, etc.)

Qt Print Support: Classes to make printing easier and portable.

Qt Publish and Subscribe: Qt Publish and Subscribe.

Qt Quick 1: Classes from Qt 4 's QtDeclarative module. Provided for Qt 4.x compatibility. For new code, use the Qt Quick module.

Qt Script: Classes for making Qt applications scriptable. Provided for Qt 4.x compatibility, for new code use the QJS* classes in the Qt Qml module.

Qt Script Tools: Additional components for applications that use Qt Script.

Qt Sensors: Access to sensors via QML and C++ interfaces.

Qt Service Framework: Framework allowing clients to discover and instantiate arbitrary services.

Qt SVG: Classes for displaying and creating SVG files.

Qt System Info: Classes to discover system-related information and capabilities.

Qt Tools: Includes Qt CLucene, Qt Designer, Qt Help, and Qt UI Tools

Qt Versit: Part of a collection of Personal Information Management APIs providing a library to convert QContacts to and from vCard files etc.

Qt Wayland: Linux only. Replacement for the removed QWS functionality. Includes Qt Compositor API (server) and Wayland platform plugin (clients).

Qt WebKit Widgets: WebKit1 and QWidget based APIs from Qt 4.

Qt Widgets: Extends Qt Gui with C++ widget functionality.

Qt XML: C++ implementations of SAX and DOM. Deprecated, use QXmlStreamReader/Writer for new functionality.

Qt XML Patterns: Support for XPath, XQuery, XSLT and XML Schema validation.

These Qt Add-Ons module are a preliminary list and new ones might be added based on demand.