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