Optimized QDeclarativeScriptString constructor for QDeclarativeExpression.
[profile/ivi/qtdeclarative.git] / doc / src / declarative / whatsnew.qdoc
1 /****************************************************************************
2 **
3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
4 ** All rights reserved.
5 ** Contact: Nokia Corporation (qt-info@nokia.com)
6 **
7 ** This file is part of the documentation of the Qt Toolkit.
8 **
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
14 ** this file.
15 **
16 ** Other Usage
17 ** Alternatively, this file may be used in accordance with the terms
18 ** and conditions contained in a signed written agreement between you
19 ** and Nokia.
20 **
21 **
22 **
23 **
24 ** $QT_END_LICENSE$
25 **
26 ****************************************************************************/
27
28 /*!
29 \title What's New in Qt Quick
30 \page qtquick-whatsnew.html
31
32 \section1 Qt 5.0.0 includes QtQuick 2.0
33
34 QtQuick 2.0 is a major update.
35
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.
39
40 The Binding element now restores any previously set binding when its \e when
41 clause becomes false.
42
43 QDeclarativeExpression can now be directly (and more efficiently) constructed from a
44 QDeclarativeScriptString.
45
46 \section1 Qt 4.7.4 includes QtQuick 1.1
47
48 QtQuick 1.1 is a minor feature update.  \e {import QtQuick 1.1} to use the new
49 features.
50
51 \section2 PinchArea
52
53 PinchArea provides support for the common two finger pinch gesture.
54
55 \section2 LayoutMirroring attached property
56
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.
60
61 \section2 Anchors
62
63 Added the following property:
64 \list
65 \o \l {Item::}{anchors.mirrored}
66 \endlist
67
68 \section2 Text
69
70 Added the following properties:
71 \list
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}
78 \endlist
79
80 horizontalAlignment now accepts Text.AlignJustify alignment mode.
81
82 \section2 TextEdit
83
84 Added the following properties, methods and signal handlers:
85 \list
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}
95 \endlist
96
97 \section2 TextInput
98
99 Added the following properties and methods:
100 \list
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
108 \endlist
109
110 \section2 Image, BorderImage and AnimatedImage
111
112 Added the following properties:
113 \list
114 \o \l{Image::}{cache}
115 \o \l{Image::}{mirror}
116 \endlist
117
118 \section2 Item
119
120 Added the following properties:
121 \list
122 \o \l{Item::}{implicitWidth} and \l{Item::}{implicitHeight}
123 \endlist
124
125 \section2 Flickable
126
127 Added the following methods:
128 \list
129 \o \l{Flickable::}{resizeContent()}
130 \o \l{Flickable::}{returnToBounds()}
131 \endlist
132
133 \section2 MouseArea
134
135 Added the following property:
136 \list
137 \o \l{MouseArea::}{preventStealing}
138 \endlist
139
140 \section2 ListView and GridView
141
142 Added the following properties and methods:
143 \list
144 \o \l{ListView::}{layoutDirection}
145 \o \l{ListView::}{effectiveLayoutDirection}
146 \o \l{ListView::}{positionViewAtBeginning()}
147 \o \l{ListView::}{positionViewAtEnd()}
148 \endlist
149
150 \section2 Flow, Grid and Row
151
152 Added the following properties:
153 \list
154 \o \l{Flow::}{layoutDirection}
155 \o \l{Flow::}{effectiveLayoutDirection}
156 \endlist
157
158 \section2 Repeater
159
160 Added the following methods and signal handlers:
161 \list
162 \o \l{Repeater::}{onItemAdded}
163 \o \l{Repeater::}{onItemRemoved}
164 \o \l{Repeater::}{itemAt()}
165 \endlist
166
167 \section2 Component
168
169 \list
170 \o The \l{Component::}{createObject()} method now accepts a map of initial
171 property values for the created object.
172 \endlist
173
174 \section2 Qt
175
176 \list
177 \o Added the \l {QML:Qt::application}{Qt.application} object to hold generic
178 global application properties.
179 \endlist
180
181 \section2 Other changes
182
183 \list
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.
187 \endlist
188
189
190 \section1 Qt 4.7.1
191
192 \section2 QtQuick namespace
193
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
198 schedule.
199
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:
202
203 \code
204 import QtQuick 1.0 
205
206 Text {
207     text: "Welcome to QtQuick 1.0!"
208 }
209 \endcode
210
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.
214 */