1 =============================================================================
2 The changes below are pre Qt 4.7.0 RC1
5 - copy(), cut() and paste() functions added
7 - was percentage based. Now specified in pixels.
9 - wantsFocus renamed to activeFocus
10 - forceFocus() renamed to forceActiveFocus()
11 - focus now returns the scoped focus (i.e. focus read/write now manipulate
13 TextInput and TextEdit:
14 - focusOnPress renamed to activeFocusOnPress
16 =============================================================================
17 The changes below are pre Qt 4.7.0 beta 2
20 - initialSize() function added
21 TextInput and TextEdit:
22 - openSoftwareInputPanel() and closeSoftwareInputPanel() functions added
24 - overShoot is replaced by boundsBehavior enumeration
25 - flickingHorizontally and flickingVertically properties added
26 - movingHorizontally and movingVertically properties added
27 - flickDirection is renamed flickableDirection
29 - isReady, isLoading, isError and isNull properties removed, use
30 status property instead
31 - errorsString() renamed to errorString()
33 - ListView.prevSection property changed to ListView.previousSection
35 - xToPosition -> positionAt (to match TextEdit.positionAt)
37 - pixmap property removed, use QDeclarativeImageProvider to serve pixmaps
40 QList<QObject*> models no longer provide properties in model object. The
41 properties are now updated when the object changes. An object's property
42 "foo" may now be accessed as "foo", modelData.foo" or model.modelData.foo"
43 component.createObject has gained a mandatory "parent" argument
44 TextEdit and TextInput now have a "selectByMouse" property that defaults to false.
48 QDeclarativeExpression::value() has been renamed to
49 QDeclarativeExpression::evaluate()
51 The QDeclarativeExpression constructor has changed from
52 QDeclarativeExpression(context, expression, scope)
54 QDeclarativeExpression(context, scope, expression, parent = 0)
56 QDeclarativeImageProvider::request() has been renamed to
57 QDeclarativeImageProvider::image() and the class can now provide
58 both qimages and qpixmaps, and qimages can be served synchronously
62 The standalone qml executable has been renamed back to Qml Viewer. Runtime warnings
63 can be now accessed via the menu (Debugging->Show Warnings).
65 =============================================================================
66 The changes below are pre Qt 4.7.0 beta 1
68 TextEdit: wrap property is replaced by wrapMode enumeration.
69 Text: wrap property is replaced by wrapMode enumeration.
70 Removed Q-prefix from validators (IntValidator, DoubleValidator, and RegExpValidator)
71 PathView: offset property now uses range 0-1.0 rather than 0-100
72 ListView, GridView::positionViewAtIndex() gained a 'mode' parameter
73 Removed Qt.playSound (replaced by SoundEffect element)
74 Removed Qt.closestAngle (use RotationAnimation instead)
75 Removed NumberFormatter
76 Removed DateTimeFormatter (use Qt.formatDateTime() instead)
77 Using WebView now requires "import QtWebKit 1.0"
78 Using Particles now requires "import Qt.labs.particles 1.0"
79 AnchorAnimation must now be used to animate anchor changes (and not NumberAnimation)
80 Removed ParentAction (use ParentAnimation instead)
81 ScriptAction: renamed stateChangeScriptName -> scriptName
82 Animation: replace repeat with loops (loops: Animation.Infinite gives the old repeat behavior)
83 AnchorChanges: use natural form to specify anchors (anchors.left instead of left)
84 AnchorChanges: removed reset property. (reset: "left" should now be anchors.left: undefined)
85 PathView: snapPosition replaced by preferredHighlightBegin, preferredHighlightEnd
86 createQmlObject: Moved to the Qt object, now use Qt.createQmlObject()
87 createComponent: Moved to the Qt object, now use Qt.createComponent()
91 QDeclarativeContext::addDefaultObject() has been replaced with
92 QDeclarativeContext::setContextObject()
94 Behavior and Animation syntax
95 -----------------------------
96 Previously animations and behaviors could be "assigned" to properties like this:
97 Item { x: Behavior {}; y: NumberAnimation {} }
98 To make it more obvious that these are not regular value assignments a new "on"
99 syntax has been introduced:
100 Item { Behavior on x {}; NumberAnimation on y {} }
101 Only the syntax has changed, the behavior is identical.
103 EaseFollow renamed to SmoothedFollow
104 ---------------------------------------
105 This element shares the internal implementation with SmoothedAnimation,
106 both providing the same easing function, but with SmoothedFollow it's
107 easier to set a start value to animate intially and then start to follow,
108 while SmoothedAnimation is still convenient for using inside Behaviors
112 Add SmoothedAnimation element
113 ---------------------------------------
114 SmoothedAnimation inherits from NumberAnimaton and as a
115 consequence SmoothedAnimation can be used inside Behaviors,
116 as PropertySourceValues or in state transitions, like any other animation.
118 The old EaseFollow properties changed to comply with the other declarative
119 animations ('source' changed to 'to'), so now 'to' changes are not
120 automatically 'followed' anymore.
122 If you want to follow an hypothetical rect1, you should do now:
126 width: 60; height: 60;
127 x: rect1.x - 5; y: rect1.y - 5;
128 Behavior on x { SmoothedAnimation { velocity: 200 } }
129 Behavior on y { SmoothedAnimation { velocity: 200 } }
132 instead of the old automatic source changed tracking:
136 width: 60; height: 60;
137 EaseFollow on x { source: rect1.x - 5; velocity: 200 }
138 EaseFollow on y { source: rect1.y - 5; velocity: 200 }
141 This is a syntax and behavior change.
144 Script element removed
145 ----------------------
146 Inline Script{} blocks have been deprecated, and will soon be removed entirely.
147 If you used Script to write inline javascript code, it can simply be removed.
152 function doSomething() {}
159 function doSomething() {}
162 If you used Script to include external JavaScript files, you can replace the
163 Script element with an “import” line. For example
174 import “foo.js” as Foo
179 The “as” qualifier is mandatory for script imports (as opposed to type
180 imports where it is optional).
183 =============================================================================
184 The changes below are pre Qt 4.7.0 alpha
186 Flickable: renamed viewportWidth -> contentWidth
187 Flickable: renamed viewportHeight -> contentHeight
188 Flickable: renamed viewportX -> contentX
189 Flickable: renamed viewportY -> contentY
190 Removed Flickable.reportedVelocitySmoothing
191 Renamed MouseRegion -> MouseArea
192 Connection: syntax and rename:
193 Connection { sender: a; signal: foo(); script: xxx }
194 Connection { sender: a; signal: bar(); script: yyy }
196 Connections { target: a; onFoo: xxx; onBar: yyy }
198 ListView::sectionExpression has been replaced by section.property, section.criteria
202 - types are strictly checked (previously, everything was a string)
203 - foo: "bar" continues to work as before
204 - foo: bar is now invalid, use foo: "bar"
205 - foo: true is now a bool (not string "true")
206 - foo: false is now a bool (not string "false" == true!)
210 matchProperties and matchTargets have been renamed back to properties and targets.
211 The semantics are explained in the PropertyAnimation::properties documentation
212 and the animation overview documentation.
214 Easing curves and their parameters are now specified via dot properties:
216 * easing.amplitude : real
217 * easing.overshoot : real
218 * easing.period : real
220 PropertyAnimation { properties: "y"; easing.type: "InOutElastic"; easing.amplitude: 2.0; easing.period: 1.5 }
224 QML_DEFINE_... definition macros, previously global macros, are replaced by
225 qmlRegisterType registration functions, which must be called explicitly.
226 C++ API users should also consider using the QmlExtensionPlugin (previously
227 named QmlModulePlugin) as a cleaner mechanism for publishing libraries of QML
228 types, or the upcoming application plugin features of the qmlviewer /
233 The API of QmlView has been narrowed and its role as a convenience class
236 - remove clearItems() - use 'delete root()'
238 - resizeContent -> enum ResizeMode { SizeViewToRootObject, SizeRootObjectToView }
239 - remove setQml(), qml()
240 - rename setUrl(), ur() to setSource(), source()
241 - root() -> rootObject(), returns QGraphicsObject rather than QmlGraphicsItem
242 - remove quit() signal -> use quit() signal of engine()
243 - initialSize() signal removed
244 - Added status() to determine status of the internal QmlComponent
245 - removed execute() - setSource() will also execute the QML.
248 =============================================================================
249 The changes below are pre-4.6.0 release.
254 The QML API is being reviewed. This file documents the changes.
255 Note that the changes are incremental, so a rename A->B for example may be followed
256 by another subsequent rename B->C, if later reviews override earlier reviews.
262 LineEdit -> TextInput
263 VerticalLayout -> Column
264 HorizontalLayout -> Row
265 VerticalPositioner -> Column
266 HorizontalPositioner -> Row
268 GridPositioner -> Grid
270 FocusRealm -> FocusScope
271 FontFamily -> FontLoader
272 Palette -> SystemPalette
274 SetProperties -> PropertyChanges
275 RunScript -> StateChangeScript
276 SetAnchors -> AnchorChanges
277 SetPropertyAction -> PropertyAction
278 RunScriptAction -> ScriptAction
279 ParentChangeAction -> ParentAction
280 VisualModel -> VisualDataModel
281 Follow -> SpringFollow
284 Item: contents -> childrenRect
285 MouseRegion: xmin -> minimumX
286 MouseRegion: xmax -> maximumX
287 MouseRegion: ymin -> minimumY
288 MouseRegion: ymin -> maximumY
289 Text elements: hAlign -> horizontalAlignment
290 Text elements: vAlign -> verticalAlignment
291 Text elements: highlightColor -> selectionColor
292 Text elements: highlightedTextColor -> selectedTextColor
293 Text elements: preserveSelection -> persistentSelection
294 State: operations -> changes
295 Transition: operations -> animations
296 Transition: fromState -> from
297 Transition: toState -> to
298 Follow: followValue -> value
299 Flickable: xPosition -> viewportX
300 Flickable: yPosition -> viewportY
301 Flickable: xVelocity -> horizontalVelocity
302 Flickable: yVelocity -> verticalVelocity
303 Flickable: velocityDecay -> reportedVelocitySmoothing
304 Flickable: locked -> interactive (note reversal of meaning)
305 Flickable: pageXPosition -> visibleArea.xPosition
306 Flickable: pageYPosition -> visibleArea.yPosition
307 Flickable: pageWidth -> visibleArea.widthRatio
308 Flickable: pageHeight -> visibleArea.heightRatio
309 WebView: idealWidth -> preferredWidth
310 WebView: idealHeight -> preferredHeight
311 WebView: status -> statusText
312 WebView: mouseX -> clickX (parameter to onDoubleClick)
313 WebView: mouseY -> clickY (parameter to onDoubleClick)
314 WebView: cacheSize -> pixelCacheSize
315 Repeater: component -> delegate
316 Repeater: dataSource -> model
317 ListView: current -> currentItem
318 GridView: current -> currentItem
319 ListView: wrap -> keyNavigationWraps
320 ListView: autoHighlight -> highlightFollowsCurrentItem
321 GridView: wrap -> keyNavigationWraps
322 GridView: autoHighlight -> highlightFollowsCurrentItem
323 Animation: targets -> matchTargets
324 Animation: properties -> matchProperties
327 MouseRegion: add "acceptedButtons" property
328 MouseRegion: add "hoverEnabled" property
329 MouseRegion: add "pressedButtons" property
330 Timer: add start() and stop() slots
331 WebView: add newWindowComponent and newWindowParent properties
332 Loader: add status() and progress() properties
333 Loader: add sourceComponent property
334 Loader: add resizeMode property
335 ListView: preferredHighlightBegin, preferredHighlightEnd
336 ListView: strictlyEnforceHighlightRange
337 Particles: Added emissionRate, emissionVariance and burst()
340 Column/VerticalPositioner: lost "margins" property
341 Row/HorizontalPositioner: lost "margins" property
342 Grid/Positioner/Layout: lost "margins" property
343 WebView: lost "interactive" property (always true now)
344 Flickable: removed "dragMode" property
345 ComponentInstance: removed. Replaced by Loader.sourceComponent
346 ListView: removed currentItemMode. Replaced by highligh range.
347 ListView: removed snapPos.
348 Particles: removed streamIn. Replaced by emissionRate
351 ids must be lowercase: Text { id: foo }, not Text { id: Foo }
352 Drag: axis becomes an enum with values "XAxis", "YAxis", "XandYAxis"
353 Image: scaleGrid property removed. New item called BorderImage instead.
354 KeyActions: changed to a Keys attached property on any item.
355 KeyProxy: changed to a Keys.forwardTo property on any item.
356 Script: now an intrinsic type in the language
357 - cannot be assigned to properties
358 - good: Item { Script { ... } }
359 - bad: Item { resources: Script { ... } }
360 Script: delay-loaded of the QML file until their source has been loaded (this only effects QML files loaded across the network.)
361 Scope: declared properties shadow a property of the same name (was previously the reverse)
362 ScriptAction and StateChangeScript: the script property now takes script rather than a string containing script (script: doSomething() rather than script: "doSomething()")
363 QmlGraphicsItem::transformOrigin default changed from TopLeft to Center
364 Animations used as PropertySourceValues are set to 'running: true' as default