Merge branch 'qtquick2' of scm.dev.nokia.troll.no:qt/qtdeclarative-staging into qtquick2
[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 ** No Commercial Usage
11 ** This file contains pre-release code and may not be distributed.
12 ** You may use this file in accordance with the terms and conditions
13 ** contained in the Technology Preview License Agreement accompanying
14 ** this package.
15 **
16 ** GNU Free Documentation License
17 ** Alternatively, this file may be used under the terms of the GNU Free
18 ** Documentation License version 1.3 as published by the Free Software
19 ** Foundation and appearing in the file included in the packaging of this
20 ** file.
21 **
22 ** If you have questions regarding the use of this file, please contact
23 ** Nokia at qt-info@nokia.com.
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.
37
38 \section1 Qt 4.7.4 includes QtQuick 1.1
39
40 QtQuick 1.1 is a minor feature update.  \e {import QtQuick 1.1} to use the new features.
41
42 \section2 PinchArea
43
44 PinchArea provides support for the common two finger pinch gesture.
45
46 \section2 LayoutMirroring attached property
47
48 \l {LayoutMirroring}{Layout mirroring} is useful when you need to support both left-to-right and right-to-left layout versions of your application that target different language areas.
49
50 \section2 Anchors
51
52 Added the following property:
53 \list
54 \o \l {Item::}{anchors.mirrored}
55 \endlist
56
57 \section2 Text
58
59 Added the following properties:
60 \list
61 \o \l {Text::}{lineHeight}
62 \o \l {Text::}{lineHeightMode}
63 \o \l {Text::}{lineCount}
64 \o \l {Text::}{maximumLineCount}
65 \o \l {Text::}{truncated}
66 \o \l {Text::}{effectiveHorizontalAlignment}
67 \endlist
68
69 horizontalAlignment now accepts Text.AlignJustify alignment mode.
70
71 \section2 TextEdit
72
73 Added the following properties, methods and signal handlers:
74 \list
75 \o \l {TextEdit::}{canPaste}
76 \o \l {TextEdit::}{lineCount}
77 \o \l {TextEdit::}{inputMethodComposing}
78 \o \l {TextEdit::}{mouseSelectionMode}
79 \o \l {TextEdit::}{effectiveHorizontalAlignment}
80 \o \l {TextEdit::}{deselect()}
81 \o \l {TextEdit::}{isRightToLeft()}
82 \o \l {TextEdit::}{moveCursorSelection()} to enable selection by word
83 \o \l {TextEdit::}{onLinkActivated}
84 \endlist
85
86 \section2 TextInput
87
88 Added the following properties and methods:
89 \list
90 \o \l {TextInput::}{canPaste}
91 \o \l {TextInput::}{inputMethodComposing}
92 \o \l {TextInput::}{mouseSelectionMode}
93 \o \l {TextInput::}{effectiveHorizontalAlignment}
94 \o \l {TextInput::}{deselect()}
95 \o \l {TextInput::}{isRightToLeft()}
96 \o \l {TextInput::}{moveCursorSelection()} to enable selection by word
97 \endlist
98
99 \section2 Image, BorderImage and AnimatedImage
100
101 Added the following properties:
102 \list
103 \o \l{Image::}{cache}
104 \o \l{Image::}{mirror}
105 \endlist
106
107 \section2 Item
108
109 Added the following properties:
110 \list
111 \o \l{Item::}{implicitWidth} and \l{Item::}{implicitHeight}
112 \endlist
113
114 \section2 Flickable
115
116 Added the following methods:
117 \list
118 \o \l{Flickable::}{resizeContent()}
119 \o \l{Flickable::}{returnToBounds()}
120 \endlist
121
122 \section2 MouseArea
123
124 Added the following property:
125 \list
126 \o \l{MouseArea::}{preventStealing}
127 \endlist
128
129 \section2 ListView and GridView
130
131 Added the following properties and methods:
132 \list
133 \o \l{ListView::}{layoutDirection}
134 \o \l{ListView::}{effectiveLayoutDirection}
135 \o \l{ListView::}{positionViewAtBeginning()}
136 \o \l{ListView::}{positionViewAtEnd()}
137 \endlist
138
139 \section2 Flow, Grid and Row
140
141 Added the following properties:
142 \list
143 \o \l{Flow::}{layoutDirection}
144 \o \l{Flow::}{effectiveLayoutDirection}
145 \endlist
146
147 \section2 Repeater
148
149 Added the following methods and signal handlers:
150 \list
151 \o \l{Repeater::}{onItemAdded}
152 \o \l{Repeater::}{onItemRemoved}
153 \o \l{Repeater::}{itemAt()}
154 \endlist
155
156 \section2 Component
157
158 \list
159 \o The \l{Component::}{createObject()} method now accepts a map of initial property values for
160 the created object.
161 \endlist
162
163 \section2 Qt
164
165 \list
166 \o Added the \l {QML:Qt::application}{Qt.application} object to hold generic global application
167 properties.
168 \endlist
169
170 \section2 Other changes
171
172 \list
173 \o Functions can be \l{Binding Properties from JavaScript}{assigned to properties from JavaScript}
174 to create property bindings.
175 \o QtQuick now supports Right to Left layout in positioners, views, anchors and text elements.
176 \endlist
177
178
179 \section1 Qt 4.7.1
180
181 \section2 QtQuick namespace
182
183 In prior Qt releases, all the Qt Quick elements were available in the \e Qt namespace.  
184 Starting with Qt 4.7.1, the elements are also available in the \e QtQuick namespace, 
185 which improves naming consistency, and allows the development of Qt Quick to occur at 
186 a faster rate than Qt's usual minor release schedule.
187
188 The change for developers is very simple - where you previously wrote \e {import Qt 4.7},
189 just replace it with \e {import QtQuick 1.0}, like this:
190
191 \code
192 import QtQuick 1.0 
193
194 Text {
195     text: "Welcome to QtQuick 1.0!"
196 }
197 \endcode
198
199 \e {import Qt 4.7} continues to work so existing applications wont break even if they 
200 aren't updated, but it is recommended that all import statements be modified to the new 
201 form.
202 */