Home · All Classes · All Functions · Overviews

What's New in Qt 4.6

Qt 4.6 provides many improvements and enhancements over the previous releases in the Qt 4 series. This document covers the most important features in this release, separated by category.

A list of other Qt 4 features can be found on the What's New in Qt 4 page.

Highlights

Support for Symbian

Qt 4.6 is the first release to include support for the Symbian platform, with integration into the S60 framework. The port to Symbian and S60 provides all functionality required to develop rich end-user applications for devices running S60 3.1 and later.

Animation Framework

The animation framework helps build highly animated, high-performance GUIs without the hassle of managing complex structures, timers, and easing curves, not to mention the large state graphs that all animated GUIs tend to be full of.

The framework makes it easy to animate QObjects, including QWidgets, by allowing Qt properties to be animated. It also allows creating custom animations and interpolation functions. Graphics views are not left out; one can animate QGraphicsWidgets and new QGraphicsObjects which inherit from QGraphicsItem (and thereby enable properties).

Animations are controlled using easing curves and can be grouped together. This enables animations of arbitrary complexity.

The API is easy to grasp with functions such as start(), stop(), pause(), and currentTime(). Here is an image from one of the examples that come with the framework:

The animation framework also plugs into the new Qt Statemachine by allowing an animation to be played when transitions are triggered. The state machine framework is introduced in 4.6 and is described below.

See The Animation Framework documentation for more information.

State Machine Framework

The state machine framework provides a robust state chart implementation based on Harel statecharts and SCXML. Qt's API lets you construct such state graphs and execute them. The key benefits of a state machine are:

It is especially the last item here that makes using a state machine worthwhile. A key characteristic of event-driven systems (such as Qt applications) is that behavior often depends not only on the last or current event, but also the events that preceded it. With statecharts, this information is easy to express.

The framework fits neatly into Qt by allowing transitions to trigger on signals and QEvents. By inserting animations into the state machine, it is also easier to use the framework for animating GUIs, for instance.

See The State Machine Framework documentation for more infromation.

Multi-touch & Gestures

The new multi-touch and gestures support enables user interaction with more than one finger, and combines sequential touch inputs to a 'gesture'.

The main benefits of this new functionality are:

See the QTouchEvent class documentation for more information. The Gesture framework API is still subject to change.

DOM access API

Web pages and XML both have very complex document object models. The W3C selector API provides a very simple way to access and manipulate such structures. This API makes it intuitive to access DOM, helps reuse CSS selector knowledge, and gives little maintenance or footprint overhead.

 QWebElement document = frame->documentElement();
 QList<QWebElement> allSpans = document.findAll("span");
 QList<QWebElement> introSpans = document.findAll("p.intro span");

See the QWebElement class documentation for more information.

Performance Optimizations

As always, Qt continuously strive to optimize its performance. For this release, we have:

Graphics Effects

Effects can be used to alter the appearance of UI elements such as QGraphicsItems and QWidgets. A range of standard effects such as blurring, colorizing or blooming is provided, and it is possible to implement custom effects.

See the QGraphicsEffect class documentation for more information.

XML Schema Validation

The QtXmlPatterns module can now be used to validate schemas, either through C++ APIs in the Qt application, or using the xmlpatternsvalidator command line utility. The implementation of XML Schema Validation supports the specification version 1.0 in large parts.

See the XML Processing and QXmlSchema class documentation for more information.

Qt3D enablers

As more of Qt, and more of the applications built on Qt go 3D, API's should be provided to simplify this. Mainly, the new API aims to make it more easy to create 3D applications with OpenGL. It will also unify the Qt OpenGL codebase, and enable cross-platform 3D codebase.

The main features of the Qt3D enablers are currently: Math primitives for matrix multiplication, vectors, quaternions (client-side), and API for vertex and fragment shaders, GLSL/ES. Future research will, among other things include stencils, scissors, vertex buffers and arrays, texture manipulation, and geometry shaders.

Multimedia Services

Qt 4.6 comes with new classes for handling audio. These classes provide low-level access to the system's audio system. By specifying the audio format (QAudioFormat) and supplying audio data through a QIODevice, you get direct access to the functionality of the sound device. The API also comes with functions to query audio devices for which audio formats they support.

See the QtMultimedia Module documentation for more information.

Classes, functions, and other items introduced in 4.6

Links to classes, function, and other items that were added in 4.6.

Classes new in Qt 4.6

QAbstractAnimationThe base of all animations
QAbstractStateThe base class of states of a QStateMachine
QAbstractTransitionThe base class of transitions between QAbstractState objects
QAbstractVideoBufferAbstraction for video data
QAbstractVideoSurfaceBase class for video presentation surfaces
QAnimationGroupAbstract base class for groups of animations
QAudioDeviceInfoInterface to query audio devices and their functionality
QAudioFormatStores audio parameter information
QAudioInputInterface for receiving audio data from an audio input device
QAudioOutputInterface for sending audio data to an audio output device
QContiguousCacheTemplate class that provides a contiguous cache
QEasingCurveEasing curves for controlling animation
QEventTransitionQObject-specific transition for Qt events
QFinalStateFinal state
QGLFramebufferObjectFormatSpecifies the format of an OpenGL framebuffer object
QGLShaderAllows OpenGL shaders to be compiled
QGLShaderProgramAllows OpenGL shader programs to be linked and used
QGenericMatrixTemplate class that represents a NxM transformation matrix with N columns and M rows
QGestureRepresents a gesture, containing all properties that describe a gesture
QGestureEventThe description of triggered gestures
QGraphicsAnchorRepresents an anchor between two items in a QGraphicsAnchorLayout
QGraphicsAnchorLayoutLayout where one can anchor widgets together in Graphics View
QGraphicsBloomEffectBloom/glow effect
QGraphicsBlurEffectBlur effect
QGraphicsColorizeEffectColorize effect
QGraphicsDropShadowEffectDrop shadow effect
QGraphicsEffectThe base class for all graphics effects
QGraphicsEffectSourceRepresents the source on which a QGraphicsEffect is installed on
QGraphicsGrayscaleEffectGrayscale effect
QGraphicsObjectBase class for all graphics items that require signals, slots and properties
QGraphicsOpacityEffectOpacity effect
QGraphicsPixelizeEffectPixelize effect
QGraphicsRotationRotation transformation around a given axis
QGraphicsScaleScale transformation
QGraphicsTransformAbstract base class for building advanced transformations on QGraphicsItems
QGraphicsWebViewAllows web content to be added to a GraphicsView
QHistoryStateMeans of returning to a previously active substate
QKeyEventTransitionTransition for key events
QMarginsDefines the four margins of a rectangle
QMatrix4x4Represents a 4x4 transformation matrix in 3D space
QMouseEventTransitionTransition for mouse events
QParallelAnimationGroupParallel group of animations
QPauseAnimationPause for QSequentialAnimationGroup
QProcessEnvironmentHolds the environment variables that can be passed to a program
QPropertyAnimationAnimates Qt properties
QProxyStyleConvenience class that simplifies dynamically overriding QStyle elements
QQuaternionRepresents a quaternion consisting of a vector and scalar
QS60StyleLook and feel suitable for applications on S60
QScopedPointerStores a pointer to a dynamically allocated object, and deletes it upon destruction
QSequentialAnimationGroupSequential group of animations
QSignalTransitionTransition based on a Qt signal
QStateGeneral-purpose state for QStateMachine
QStateMachineHierarchical finite state machine
QTileRules
QTouchEventContains parameters that describe a touch event
QVariantAnimationAbstract base class for animations
QVector2DRepresents a vector or vertex in 2D space
QVector3DRepresents a vector or vertex in 3D space
QVector4DRepresents a vector or vertex in 4D space
QVideoFrameRepresentation of a frame of video data
QVideoSurfaceFormatSpecifies the stream format of a video presentation surface
QWebElementConvenient access to DOM elements in a QWebFrame
QWebInspectorAllows the placement and control of a QWebPage's inspector. The inspector allows you to see a page current hierarchy and loading statistics
QWebPluginDatabaseInterface for managing Netscape plugins used by WebKit in QWebPages
QWebPluginInfoRepresents a single Netscape plugin
QWidgetThe base class of all user interface objects
QXmlSchemaLoading and validation of a W3C XML Schema
QXmlSchemaValidatorValidates XML instance documents against a W3C XML Schema
QStateMachine::SignalEventRepresents a Qt signal event
QTouchEvent::TouchPointInformation about a touch point in a QTouchEvent
QStateMachine::WrappedEventHolds a clone of an event associated with a QObject

Functions and Macros new in Qt 4.6

QBENCHMARK_ONCE()For measuring performance of a code block by running it once
QT_TRID_NOOP()Marks an id for dynamic translation
QGraphicsItem::acceptTouchEvents()
QGraphicsScene::activePanel()
QGraphicsLayout::addChildLayoutItem()
QWebSecurityOrigin::addLocalScheme()
QNetworkCacheMetaData::attributes()
QGLFramebufferObject::blitFramebuffer()
QWebSettings::clearMemoryCaches()
QSslSocket::connectToHostEncrypted()
QWidget::contentsMargins()Returns the widget's contents margins
QWebFrame::contentsSizeChanged()
QWeakPointer::data()
QWebSettings::defaultTextEncoding()
QNetworkAccessManager::deleteResource()
QWebFrame::documentElement()
QWebHitTestResult::element()
QWebSettings::enablePersistentStorage()
QWebHitTestResult::enclosingBlockElement()
QSystemLocale::fallbackLocale()
QGraphicsItem::filtersChildEvents()
QWebFrame::findAllElements()
QWebFrame::findFirstElement()
QGraphicsItem::focusItem()
QGraphicsItem::focusProxy()
QWebPage::frameAt()
QDBusPendingCall::fromCompletedCall()
QDBusPendingCall::fromError()
QGraphicsItem::graphicsEffect()
QGraphicsItem::graphicsEffect()
QWebView::guessUrlFromString()
QGLFramebufferObject::hasOpenGLFramebufferBlit()
QNetworkReply::ignoreSslErrors()
QNetworkReply::ignoreSslErrors()
QGraphicsItem::inputMethodHints()
QGraphicsScene::isActive()
QGraphicsScene::isActive()
QGraphicsItem::isBlockedByModalPanel()
QNetworkReply::isFinished()
QGraphicsItem::isPanel()
QNetworkReply::isRunning()
QGraphicsView::isTransformed()
QGraphicsScene::itemAt()
QGraphicsScene::itemAt()
QGraphicsScene::items()Returns all visible items that, depending on mode, are at the specified pos in a list sorted using order
QGraphicsScene::items()Returns all visible items that, depending on mode, are at the specified pos in a list sorted using order
QGraphicsScene::items()Returns all visible items that, depending on mode, are at the specified pos in a list sorted using order
QGraphicsScene::items()Returns all visible items that, depending on mode, are at the specified pos in a list sorted using order
QGraphicsScene::items()Returns all visible items that, depending on mode, are at the specified pos in a list sorted using order
QStyleOptionGraphicsItem::levelOfDetailFromTransform()
QWebHitTestResult::linkElement()
QWebFrame::loadFinished()
QWebFrame::loadStarted()
QWebSecurityOrigin::localSchemes()
QWebSettings::localStoragePath()
QSharedPointer::objectCast()
QWebSettings::offlineWebApplicationCachePath()
QWebSettings::offlineWebApplicationCacheQuota()
operator<<()Streams a history into a data stream
QWeakPointer::operator=()
operator>>()Loads a history from a data stream
QGraphicsLayoutItem::ownedByLayout()
QGraphicsItem::panel()
QGraphicsItem::panelModality()
QGraphicsItem::parentObject()
QWidget::previousInFocusChain()Returns the previous widget in this widget's focus chain
qDrawBorderPixmap()For drawing a pixmap into the margins of a rectangle
qFuzzyCompare()
qFuzzyCompare()
qSharedPointerObjectCast()For casting a shared pointer
qSharedPointerObjectCast()For casting a shared pointer
qtTrId()Finds and returns a translated string
QXmlStreamReader::readElementText()
QXmlStreamReader::readNextStartElement()
QSyntaxHighlighter::rehighlightBlock()
QWebDatabase::removeAllDatabases()
QWebSecurityOrigin::removeLocalScheme()
QWebHistory::restoreState()
QGraphicsItem::rotation()
QWebHistory::saveState()
QGraphicsItem::scale()
QWebFrame::scrollBarGeometry()
QGraphicsScene::sendEvent()
QGraphicsItem::setAcceptTouchEvents()
QGraphicsItem::setActive()
QGraphicsScene::setActivePanel()
QNetworkCacheMetaData::setAttributes()
QWebFrame::setClipRenderToViewport()
QWidget::setContentsMargins()Sets the margins around the widget's contents
QWebSettings::setDefaultTextEncoding()
QGraphicsItem::setFiltersChildEvents()
QXmlQuery::setFocus()
QXmlQuery::setFocus()
QGraphicsItem::setFocusProxy()
QGraphicsItem::setGraphicsEffect()
QGraphicsItem::setGraphicsEffect()
QGraphicsItem::setInputMethodHints()
QWebSettings::setLocalStoragePath()
QWebSettings::setOfflineWebApplicationCachePath()
QWebSettings::setOfflineWebApplicationCacheQuota()
QGraphicsLayoutItem::setOwnedByLayout()
QGraphicsItem::setPanelModality()
QWebView::setRenderHint()
QGraphicsItem::setRotation()
QGraphicsItem::setScale()
QGraphicsScene::setSelectionArea()
QGraphicsScene::setSelectionArea()
QGraphicsItem::setTransformOriginPoint()
QGraphicsItem::setTransformOriginPoint()
QGraphicsItem::setTransformations()
QNetworkProxyFactory::setUseSystemConfiguration()
QGraphicsItem::setX()
QGraphicsItem::setY()
QWebPage::shouldInterruptJavaScript()
QXmlStreamReader::skipCurrentElement()
QAbstractXmlNodeModel::sourceLocation()
QGraphicsItem::stackBefore()
QScriptEngineDebugger::state()
QProcessEnvironment::systemEnvironment()Returns the environment of the calling process
QGraphicsItem::toGraphicsObject()
QGraphicsItem::toGraphicsObject()
QGraphicsItem::transformOriginPoint()
QGraphicsItem::transformations()
QWebPage::webInspectorTriggered()


Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt 4.6.0