1 /****************************************************************************
3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
4 ** All rights reserved.
5 ** Contact: Nokia Corporation (qt-info@nokia.com)
7 ** This file is part of the documentation of the Qt Toolkit.
9 ** $QT_BEGIN_LICENSE:FDL$
10 ** GNU Free Documentation License
11 ** Alternatively, this file may be used under the terms of the GNU Free
12 ** Documentation License version 1.3 as published by the Free Software
13 ** Foundation and appearing in the file included in the packaging of
17 ** Alternatively, this file may be used in accordance with the terms
18 ** and conditions contained in a signed written agreement between you
26 ****************************************************************************/
29 \title What's New in Qt Quick
30 \page qtquick-whatsnew.html
32 \section1 Qt 5.0.0 includes QtQuick 2.0
34 QtQuick 2.0 is a major update.
36 MouseArea now propagates clicked, doubleClicked and pressAndHold differently to pressed.
37 These will now be propagated to the highest-stacking-order enabled MouseArea which has a handler for them.
38 You can still ignore these events in the handler to let them pass through.
40 The Binding element now restores any previously set binding when its \e when
43 QDeclarativeExpression can now be directly (and more efficiently) constructed from a
44 QDeclarativeScriptString.
46 \section1 Qt 4.7.4 includes QtQuick 1.1
48 QtQuick 1.1 is a minor feature update. \e {import QtQuick 1.1} to use the new
53 PinchArea provides support for the common two finger pinch gesture.
55 \section2 LayoutMirroring attached property
57 \l {LayoutMirroring}{Layout mirroring} is useful when you need to support both
58 left-to-right and right-to-left layout versions of your application that target
59 different language areas.
63 Added the following property:
65 \o \l {Item::}{anchors.mirrored}
70 Added the following properties:
72 \o \l {Text::}{lineHeight}
73 \o \l {Text::}{lineHeightMode}
74 \o \l {Text::}{lineCount}
75 \o \l {Text::}{maximumLineCount}
76 \o \l {Text::}{truncated}
77 \o \l {Text::}{effectiveHorizontalAlignment}
80 horizontalAlignment now accepts Text.AlignJustify alignment mode.
84 Added the following properties, methods and signal handlers:
86 \o \l {TextEdit::}{canPaste}
87 \o \l {TextEdit::}{lineCount}
88 \o \l {TextEdit::}{inputMethodComposing}
89 \o \l {TextEdit::}{mouseSelectionMode}
90 \o \l {TextEdit::}{effectiveHorizontalAlignment}
91 \o \l {TextEdit::}{deselect()}
92 \o \l {TextEdit::}{isRightToLeft()}
93 \o \l {TextEdit::}{moveCursorSelection()} to enable selection by word
94 \o \l {TextEdit::}{onLinkActivated}
99 Added the following properties and methods:
101 \o \l {TextInput::}{canPaste}
102 \o \l {TextInput::}{inputMethodComposing}
103 \o \l {TextInput::}{mouseSelectionMode}
104 \o \l {TextInput::}{effectiveHorizontalAlignment}
105 \o \l {TextInput::}{deselect()}
106 \o \l {TextInput::}{isRightToLeft()}
107 \o \l {TextInput::}{moveCursorSelection()} to enable selection by word
110 \section2 Image, BorderImage and AnimatedImage
112 Added the following properties:
114 \o \l{Image::}{cache}
115 \o \l{Image::}{mirror}
120 Added the following properties:
122 \o \l{Item::}{implicitWidth} and \l{Item::}{implicitHeight}
127 Added the following methods:
129 \o \l{Flickable::}{resizeContent()}
130 \o \l{Flickable::}{returnToBounds()}
135 Added the following property:
137 \o \l{MouseArea::}{preventStealing}
140 \section2 ListView and GridView
142 Added the following properties and methods:
144 \o \l{ListView::}{layoutDirection}
145 \o \l{ListView::}{effectiveLayoutDirection}
146 \o \l{ListView::}{positionViewAtBeginning()}
147 \o \l{ListView::}{positionViewAtEnd()}
150 \section2 Flow, Grid and Row
152 Added the following properties:
154 \o \l{Flow::}{layoutDirection}
155 \o \l{Flow::}{effectiveLayoutDirection}
160 Added the following methods and signal handlers:
162 \o \l{Repeater::}{onItemAdded}
163 \o \l{Repeater::}{onItemRemoved}
164 \o \l{Repeater::}{itemAt()}
170 \o The \l{Component::}{createObject()} method now accepts a map of initial
171 property values for the created object.
177 \o Added the \l {QML:Qt::application}{Qt.application} object to hold generic
178 global application properties.
181 \section2 Other changes
184 \o Functions can be \l{Property Binding#Property Binding}{assigned to properties from JavaScript}
185 to create property bindings.
186 \o QtQuick now supports Right to Left layout in positioners, views, anchors and text elements.
192 \section2 QtQuick namespace
194 In prior Qt releases, all the Qt Quick elements were available in the \e Qt
195 namespace. Starting with Qt 4.7.1, the elements are also available in the
196 \e QtQuick namespace, which improves naming consistency, and allows the
197 development of Qt Quick to occur at a faster rate than Qt's usual minor release
200 The change for developers is very simple - where you previously wrote
201 \e {import Qt 4.7}, just replace it with \e {import QtQuick 1.0}, like this:
207 text: "Welcome to QtQuick 1.0!"
211 \e {import Qt 4.7} continues to work so existing applications won't break even
212 if they aren't updated, but it is recommended that all import statements be
213 modified to the new form.