Extract all QtQuick 1 elements into a separate library/plugin.
[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 can now be used as a value source, and will also restore any previously
41 set binding when its \e when clause becomes false.
42
43 QDeclarativeExpression can now be directly (and more efficiently) constructed from a
44 QDeclarativeScriptString.
45
46 \section2 QtQuick 1 is now a separate library and module
47
48 Writing C++ applications using QtQuick 1 specific API, i.e. QDeclarativeView or QDeclarativeItem
49 requires adding the "qtquick1" module to the .pro file, e.g. QT += declarative qtquick1
50
51 QDeclarativeView and QDeclarativeItem headers are now in the QtQuick 1 module, i.e.
52 #include <QtQuick1/QDeclarativeView>
53 #include <QtQuick1/QDeclarativeItem>
54
55 "import QtQuick 1.0" loads the module dynamically.  To deploy QtQuick 1 applications
56 the library (lib/libQtQuick1*) and plugin (imports/QtQuick/) must be installed.
57
58
59 \section1 Qt 4.7.4 includes QtQuick 1.1
60
61 QtQuick 1.1 is a minor feature update.  \e {import QtQuick 1.1} to use the new
62 features.
63
64 \section2 PinchArea
65
66 PinchArea provides support for the common two finger pinch gesture.
67
68 \section2 LayoutMirroring attached property
69
70 \l {LayoutMirroring}{Layout mirroring} is useful when you need to support both
71 left-to-right and right-to-left layout versions of your application that target
72 different language areas.
73
74 \section2 Anchors
75
76 Added the following property:
77 \list
78 \o \l {Item::}{anchors.mirrored}
79 \endlist
80
81 \section2 Text
82
83 Added the following properties:
84 \list
85 \o \l {Text::}{lineHeight}
86 \o \l {Text::}{lineHeightMode}
87 \o \l {Text::}{lineCount}
88 \o \l {Text::}{maximumLineCount}
89 \o \l {Text::}{truncated}
90 \o \l {Text::}{effectiveHorizontalAlignment}
91 \endlist
92
93 horizontalAlignment now accepts Text.AlignJustify alignment mode.
94
95 \section2 TextEdit
96
97 Added the following properties, methods and signal handlers:
98 \list
99 \o \l {TextEdit::}{canPaste}
100 \o \l {TextEdit::}{lineCount}
101 \o \l {TextEdit::}{inputMethodComposing}
102 \o \l {TextEdit::}{mouseSelectionMode}
103 \o \l {TextEdit::}{effectiveHorizontalAlignment}
104 \o \l {TextEdit::}{deselect()}
105 \o \l {TextEdit::}{isRightToLeft()}
106 \o \l {TextEdit::}{moveCursorSelection()} to enable selection by word
107 \o \l {TextEdit::}{onLinkActivated}
108 \endlist
109
110 \section2 TextInput
111
112 Added the following properties and methods:
113 \list
114 \o \l {TextInput::}{canPaste}
115 \o \l {TextInput::}{inputMethodComposing}
116 \o \l {TextInput::}{mouseSelectionMode}
117 \o \l {TextInput::}{effectiveHorizontalAlignment}
118 \o \l {TextInput::}{deselect()}
119 \o \l {TextInput::}{isRightToLeft()}
120 \o \l {TextInput::}{moveCursorSelection()} to enable selection by word
121 \endlist
122
123 \section2 Image, BorderImage and AnimatedImage
124
125 Added the following properties:
126 \list
127 \o \l{Image::}{cache}
128 \o \l{Image::}{mirror}
129 \endlist
130
131 \section2 Item
132
133 Added the following properties:
134 \list
135 \o \l{Item::}{implicitWidth} and \l{Item::}{implicitHeight}
136 \endlist
137
138 \section2 Flickable
139
140 Added the following methods:
141 \list
142 \o \l{Flickable::}{resizeContent()}
143 \o \l{Flickable::}{returnToBounds()}
144 \endlist
145
146 \section2 MouseArea
147
148 Added the following property:
149 \list
150 \o \l{MouseArea::}{preventStealing}
151 \endlist
152
153 \section2 ListView and GridView
154
155 Added the following properties and methods:
156 \list
157 \o \l{ListView::}{layoutDirection}
158 \o \l{ListView::}{effectiveLayoutDirection}
159 \o \l{ListView::}{positionViewAtBeginning()}
160 \o \l{ListView::}{positionViewAtEnd()}
161 \endlist
162
163 \section2 Flow, Grid and Row
164
165 Added the following properties:
166 \list
167 \o \l{Flow::}{layoutDirection}
168 \o \l{Flow::}{effectiveLayoutDirection}
169 \endlist
170
171 \section2 Repeater
172
173 Added the following methods and signal handlers:
174 \list
175 \o \l{Repeater::}{onItemAdded}
176 \o \l{Repeater::}{onItemRemoved}
177 \o \l{Repeater::}{itemAt()}
178 \endlist
179
180 \section2 Component
181
182 \list
183 \o The \l{Component::}{createObject()} method now accepts a map of initial
184 property values for the created object.
185 \endlist
186
187 \section2 Qt
188
189 \list
190 \o Added the \l {QML:Qt::application}{Qt.application} object to hold generic
191 global application properties.
192 \endlist
193
194 \section2 Other changes
195
196 \list
197 \o Functions can be \l{Property Binding#Property Binding}{assigned to properties from JavaScript}
198 to create property bindings.
199 \o QtQuick now supports Right to Left layout in positioners, views, anchors and text elements.
200 \endlist
201
202
203 \section1 Qt 4.7.1
204
205 \section2 QtQuick namespace
206
207 In prior Qt releases, all the Qt Quick elements were available in the \e Qt
208 namespace. Starting with Qt 4.7.1, the elements are also available in the
209 \e QtQuick namespace, which improves naming consistency, and allows the
210 development of Qt Quick to occur at a faster rate than Qt's usual minor release
211 schedule.
212
213 The change for developers is very simple - where you previously wrote
214 \e {import Qt 4.7}, just replace it with \e {import QtQuick 1.0}, like this:
215
216 \code
217 import QtQuick 1.0 
218
219 Text {
220     text: "Welcome to QtQuick 1.0!"
221 }
222 \endcode
223
224 \e {import Qt 4.7} continues to work so existing applications won't break even
225 if they aren't updated, but it is recommended that all import statements be
226 modified to the new form.
227 */