1 /****************************************************************************
3 ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/
6 ** This file is part of the documentation of the Qt Toolkit.
8 ** $QT_BEGIN_LICENSE:FDL$
9 ** GNU Free Documentation License
10 ** Alternatively, this file may be used under the terms of the GNU Free
11 ** Documentation License version 1.3 as published by the Free Software
12 ** Foundation and appearing in the file included in the packaging of
16 ** Alternatively, this file may be used in accordance with the terms
17 ** and conditions contained in a signed written agreement between you
26 ****************************************************************************/
29 \title QtQuick Module Release Notes
30 \page qtquick-releasenotes.html
31 \inqmlmodule QtQuick 2.0
33 \section1 Qt 5.0 - QtQuick C++ Module
35 The QtQuick C++ module is new in Qt 5. It provides the visual canvas and scenegraph backend
36 as well as the QtQuick QML module for QML application development.
38 As of Qt 5, the QtQuick module is based on an OpenGL scenegraph. Many of the classes in
39 the QtQuick module have been ported from the \c QtDeclarative module from Qt 4.8 to use
40 the scenegraph architecture; these classes have been renamed to use a \c QQuick* prefix.
41 (See the \l {Porting QML Applications to Qt 5} for porting information.)
43 The following classes provide the basic functionality for interacting with the QML visual
47 \li QQuickItem - the base visual QML type (replaces \c QDeclarativeItem)
48 \li QQuickView - a window for rendering a QML scene from a QML file (replaces \c QDeclarativeView)
49 \li QQuickCanvas - a base canvas for displaying a QML scene
50 \li QQuickPaintedItem - convenience for using the QPainter API with the scenegraph
51 \li QQuickImageProvider - fetches custom images for use in QML applications (replaces \c QDeclarativeImageProvider)
52 \li QQuickTextureFactory - use with QQuickImageProvider::requestTexture()
55 Custom rendering can be performed on the scenegraph using the following new classes:
60 \li QSGBasicGeometryNode
67 \li QSGFlatColorMaterial
69 \li QSGSimpleTextureNode
72 \li QSGOpaqueTextureMaterial
73 \li QSGTextureMaterial
74 \li QSGTextureProvider
75 \li QSGVertexColorMaterial
79 \section1 Qt 5.0 - QtQuick QML Module
81 The QtQuick 2.0 QML module is a major update.
83 Below are the additions and changes in QtQuick 2.0:
85 \section2 Graphics and Animations
88 \li New \l Canvas type for drawing. This provides a HTML5 canvas like API along with some additional features.
90 \li Supports two render targets: \c Canvas.Image and \c Canvas.FramebufferObject.
91 \li Supports background thread rendering.
92 \li Supports tiled canvas rendering.
93 \li Supports most of the HTML5 context2d APIs.
97 \li New \l{Image::}{horizontalAlignment} and \l{Image::}{verticalAlignment} properties.
98 \li New \c Image.Pad enum value for \l{Image::}{fillMode} that does not transform the image, unlike other \l{Image::}{fillMode} enum values.
99 \li Modifying the \l{Image::}{sourceSize} now fits the image to the size, maintaining aspect ratio.
101 \li New SpriteSequence type renders animated sprites and can transition between animations.
102 \li New \l Sprite type which represents each animation in a SpriteSequence.
103 \li New AnimatedSprite type for drawing single sprite animations.
104 \li New PathArc, PathCurve and PathSvg types:
106 \li PathArc and PathCurve support the construction of arcs and catmull-rom curves, respectively. PathSvg supports the construction of a path from a SVG string.
117 \li When \c Text.AutoText format is enabled, the text object will automatically switch to \c Text.StyledText instead of \c Text.RichText.
118 \li New \l{Text::}{onLineLaidOut} handler is called for every line during the layout process to give the option of positioning and/or resizing lines as they are laid out.
119 \li New \l{Text::}{doLayout()} method will trigger the text layout from Javascript.
120 \li \c Text.RightElide is now supported where text spans multiple lines.
121 \li New \l{Text::}{fontSizeMode} property allows text to be fitted to the item size.
122 \li New \l{Text::}{minimumPixelSize} and \l {Text::}{minimumPointSize} properties can be used to specify a lower bound when auto-fitting.
126 \li \l{TextEdit::}{textFormat} property now defaults to \c PlainText instead of \c AutoText.
130 \li New \l{TextInput::}{wrapMode} property.
131 \li New \l{TextInput::}{horizontalAlignment} and \l{TextInput::}{verticalAlignment} properties.
132 \li \l{TextInput::}{positionAt()} method now takes a y parameter.
139 \li New MultiPointTouchArea type processes multi-point touches and provides information on touch points including position, pressure and velocity.
142 \li Wheel events are now supported.
143 \li The \l{MouseArea::}{onClicked}, \l{MouseArea::}{onDoubleClicked} and \l{MouseArea::}{onPressAndHold} signals are now propagated differently to \l{MouseArea::}{onPressed}. These will now be propagated to the highest-stacking-order enabled MouseArea that has a handler for them. You can still ignore these events in the handler to let them pass through; this behavior is triggered with the new property \l{MouseArea::}{propagateComposedEvents}.
144 \li New \l{MouseArea::}{propagateComposedEvents} property sets whether composed events are propagated to other mouse areas.
148 \section2 Specialised Containers
153 \li New \l{Flickable::}{rebound} property specifies the transition to be applied when a flickable snaps back to its bounds.
154 \li New \l{Flickable::}{topMargin}, \l{Flickable::}{bottomMargin}, \l{Flickable::}{leftMargin}, \l{Flickable::}{rightMargin} allow extra margin space to be specified for a flickable. This can be used, for example, to implement the pull-to-refresh functionality for a list.
155 \li New \l{Flickable::}{originX} and \l{Flickable::}{originY} properties provide the top left position of the content item.
156 \li New \l{Flickable::}{dragging}, \l{Flickable::}{draggingHorizontally} and \l{Flickable::}{draggingVertically} properties provide information on whether a flickable is currently being dragged.
160 \section2 Positioners (Row, Column, Grid, Flow types):
163 \li The \c add and \c move transitions can now access a ViewTransition attached property (see the ViewTransition documentation for examples) and can now animate arbitrary item properties (instead of being restricted to animating an item's position).
164 \li New \l Positioner type provides \c index, \c isFirstItem and \c isLastItem attached properties for items within positioners.
165 \li All \c spacing properties on positioners now use real numbers instead of integers.
168 \li New \l{Grid::}{rowSpacing} and \l{Grid::}{columnSpacing} properties.
172 \section2 Models and Views
175 \li ListView and GridView:
177 \li New transition support for animating the adding, removing and moving of items in a ListView or GridView. See the ViewTransition documentation for details.
178 \li New \c verticalLayoutDirection property enables items to be laid out from bottom-to-top using the new \c BottomToTop enum value.
179 \li New \c headerItem and \c footerItem properties provide access to the instantiated header and footer items.
180 \li The \c cacheBuffer property now has a non-zero default.
181 \li Delegates in the cache buffer are now created asynchronously.
182 \li Setting a \c RightToLeft layout now also reverses the \c preferredHighlightBegin and \c preferredHighlightEnd.
186 \li New \l{ListView::}{section.labelPositioning} property can fix the current section label to the start of the view, and the next section label to the end of the view, so that labels do not scroll while section items are still in view.
190 \li New \l{PathView::}{currentItem} property.
191 \li New \l{PathView::}{maximumFlickVelocity} property.
195 \section2 Utility types
200 \li New \l{Loader::}{asynchronous} property allows components to be instantiated with lower chance of blocking. If source is used with \e {asynchonous: true} the component will be compiled in a background thread.
201 \li New \l{Loader::}{active} property delays instantiation of a \l Loader object's \l{Loader::}{item}.
202 \li New \l{Loader::}{setSource()} method can load an object with specific initial property values, similar to \l Component::createObject().
203 \li The \c sourceChanged signal is now only emitted when the \l{Loader::}{source} changes and the \c sourceComponentChanged signal is now only emitted when the \l{Loader::}{sourceComponent} changes. (Previously Loader emitted both signals when only one of the properties had changed.)
207 \li This type can now be used as a value source, and will also restore any previously set binding when its \l{Binding::}{when} clause becomes false.
212 \section1 Qt 5.0 - Additional QML Modules
214 \section2 QtQuick.Particles
216 The new QtQuick.Particles module provides particle system support for creating a variety of 2D particle systems. See the QtQuick.Particles documentation for comprehensive details.
218 \section2 QtQuick.XmlListModel
220 XmlListModel has now moved into its own module, QtQuick.XmlListModel. This module must now be imported to use the XmlListModel and XmlRole types.