Qt rev’d
May 6, 2008 — by LinuxDevices Staff — from the LinuxDevices Archive — 4 viewsTrolltech has released a new version of its cross-platform application development framework. Qt 4.4 incorporates the open source Webkit browser engine, Phonon multimedia framework, and Qt Concurrency threads library for multicore, while adding support for Windows CE and Windows Mobile as build… targets.
(Click for larger view of Qt 4.4 media player demo)
Qt is an application development framework intended to let developers compile binaries for various platforms — Linux, Windows, Mac, Java, and now Windows CE — from a single C++ code base. Comprised of some 400 C++ class libraries, its API is consistent across all supported platforms, Trolltech says.
Previously released versions of Qt run on Windows desktops (“Qt/Windows”), OS X (“Qt/Mac”), Java (“Qt/Jambi”), desktop Linux (“Qt/X11”), and embedded Linux (“Qt for Embedded Linux,” formerly “Qtopia”). Version 4.4 now supports Windows CE 5.0 and 6.0, and Windows Mobile 5.0 and 6.0.
Trolltech Qt 4.4 architecture
(Click to enlarge)
In addition to the Windows CE and Windows Mobile support, new features touted for version 4.4 include:
- Incorporation of Webkit, the open-source browser engine used by Apple's Safari browser, the Apple iPhone, and Nokia smartphones
- The addition of widgets support to Qt's QGraphicsView canvas
- Support for Phonon, a cross-platform multimedia framework developed in conjunction with the KDE community
- Inclusion of a new Qt Concurrency API (applications programming interface), said to simplify some kinds of multi-threaded application programming on multi-CPU systems
- Support for the XQuery XML standard
Windows CE and Mobile support
Trolltech first announced plans to add support for Windows CE and Windows Mobile to Qt in October 2007. Today's formal release of Qt 4.4 marks a near-complete port of the framework's API and developer tools to Microsoft's device-oriented Windows CE operating systems.
Qt's text editor running on Windows Mobile (Click to enlarge) |
Qt's Tetrix application in Windows Mobile's landscape mode (Click to enlarge) |
Applications developed using any previous Qt versions can now be moved to Windows CE or Mobile, where they will look and act like native applications, according to Trolltech CTO Benoit Schillings. When statically linked and stripped of unused functions, the typical Qt overhead in terms of footprint is about 10MB, he suggests.
Qt for Windows CE features Visual Studio integration
(Click to enlarge)
According to Espen Riskedal, Trolltech's team lead for the company's Qt for Windows CE development project, Qt 4.4 for Windows CE and Windows Mobile saves space on devices by implementing a Qfeatures system, allowing developers to configure which classes should be built inside the separate Qt modules. It also implements asynchronous networking functionality that the Microsoft operating systems lacked natively, he adds.
A video demonstration, posted by Riskedal on his blog, shows a common set of Qt demo programs running on both a Windows Mobile-based HTC Touch Cruise phone with a QVGA display, and a Linux-based Neo1973, with full VGA resolution. “This demo set was originally developed and compiled for embedded Linux. All that was needed to have it running out of the box for Windows CE and Mobile was to add a few deployment rules to the .pro file for the demo. Now, it goes without saying that these demos run out of the box on our desktop platforms too,” he writes.
Webkit and widgets
Trolltech had originally revealed its intentions to integrate Webkit into Qt in October, and then followed up with more details in February. WebKit is an open-source HTML rendering engine best-known for its use in the OS X, iPhone, and Windows versions of Safari. Originally derived from the HTML rendering engine used in the KDE community's Konqueror browser, WebKit now targets “Web 2.0” features such as asynchronous Javascript (Ajax), and has a smaller footprint than most alternatives. Among other uses, it has been employed by Adobe, which used it as the foundation for its AIR (Adobe Integrated Runtime) web development toolsuite.
Webkit-enabled applications
(Click any to enlarge)
Qt provides Webkit via a QWebView widget that can be used like any other, and is even supported by the drag-and-drop user interface design tool, Qt Designer, according to the company. The integration should result in fewer differences between the desktop and mobile versions of Qt-based applications like Google Earth and iTunes, says Trolltech, as well as simpler integration of live web content and services on both mobile and desktop applications. It should also enable developers to use web technologies to build user interfaces for either kind of application.
Qt 4.4 embedded dialogs demo
(Click to enlarge)
Also new to Qt 4.4 is support for XML widgets on QT's QGraphicsView canvas. QGraphicsView already offered an object-oriented model for laying out and maintaining 2D graphics items. Now, widgets can be imported and manipulated into the canvas just like other graphics can. Among other things, this lets programmers create dialog boxes that can transform themselves in many different ways according to user input (see above).
Phonon and concurrency
Qt version 4.4 improves multimedia performance by leveraging a desktop media framework developed by the KDE project. Phonon is an abstraction layer aimed at making it easier to create multimedia applications that run on any platform Qt supports, says Trolltech. Phonon has been enhanced by Trolltech to support non-Linux platforms such as Quicktime on Macintosh OS X and DirectShow 9 on Windows.
Another addition is a Qt Concurrency library aimed at easing some types of multi-core programming. Trolltech says the framework provides high-level APIs that make it possible to write multi-threaded programs without using low-level threading primitives.
Finally, Qt 4.4 is said to offer support for the XQuery standard. XQuery enables developers to query, extract, and transform data from XML-encoded content.
In January, Finland-based Nokia announced plans to acquire Trolltech. Nokia also recently announced it would support Qt application development for Maemo, its Linux-based platform for Internet tablets.
Availability
Qt 4.4 is available now, says Trolltech. Developers creating open source applications can license the release under GPL (both version 2 and 3), and developers creating commercial applications can license Qt with a standard license. More information and a link to the download page should be available here.
This article was originally published on LinuxDevices.com and has been donated to the open source community by QuinStreet Inc. Please visit LinuxToday.com for up-to-date news and articles about Linux and open source.