aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/localstorage/localstorage.qdoc2
-rw-r--r--doc/src/qml/basictypes.qdoc2
-rw-r--r--doc/src/qml/c++models.qdoc10
-rw-r--r--doc/src/qml/codingconventions.qdoc20
-rw-r--r--doc/src/qml/debugging.qdoc10
-rw-r--r--doc/src/qml/dynamicobjects.qdoc32
-rw-r--r--doc/src/qml/extending-tutorial.qdoc30
-rw-r--r--doc/src/qml/integrating.qdoc18
-rw-r--r--doc/src/qml/javascriptblocks.qdoc40
-rw-r--r--doc/src/qml/modules.qdoc44
-rw-r--r--doc/src/qml/network.qdoc10
-rw-r--r--doc/src/qml/propertybinding.qdoc54
-rw-r--r--doc/src/qml/qmlcomponents.qdoc40
-rw-r--r--doc/src/qml/qmldocument.qdoc10
-rw-r--r--doc/src/qml/qmlengine.qdoc136
-rw-r--r--doc/src/qml/qmlevents.qdoc16
-rw-r--r--doc/src/qml/qmlintro.qdoc2
-rw-r--r--doc/src/qml/qmlplugins.qdoc12
-rw-r--r--doc/src/qml/qmlruntime.qdoc38
-rw-r--r--doc/src/qml/qmlsyntax.qdoc2
-rw-r--r--doc/src/qml/qmltypes.qdoc10
-rw-r--r--doc/src/qml/qmlviewer.qdoc2
-rw-r--r--doc/src/qml/qtbinding.qdoc166
-rw-r--r--doc/src/qml/qtdeclarative.qdoc48
-rw-r--r--doc/src/qml/qtprogrammers.qdoc14
-rw-r--r--doc/src/qtquick2/animation.qdoc28
-rw-r--r--doc/src/qtquick2/focus.qdoc22
-rw-r--r--doc/src/qtquick2/modelview.qdoc30
-rw-r--r--doc/src/qtquick2/mouseevents.qdoc6
-rw-r--r--doc/src/qtquick2/positioners.qdoc8
-rw-r--r--doc/src/qtquick2/qmltexthandling.qdoc4
-rw-r--r--doc/src/qtquick2/qtquick-intro.qdoc10
-rw-r--r--doc/src/qtquick2/qtquick2.qdoc2
-rw-r--r--doc/src/qtquick2/righttoleft.qdoc12
-rw-r--r--doc/src/qtquick2/states.qdoc6
-rw-r--r--doc/src/qtquick2/writingcomponents.qdoc34
-rw-r--r--doc/src/snippets/qml/Button.qml (renamed from doc/src/snippets/declarative/Button.qml)0
-rw-r--r--doc/src/snippets/qml/SelfDestroyingRect.qml (renamed from doc/src/snippets/declarative/SelfDestroyingRect.qml)0
-rw-r--r--doc/src/snippets/qml/Sprite.qml (renamed from doc/src/snippets/declarative/Sprite.qml)0
-rw-r--r--doc/src/snippets/qml/anchoranimation.qml (renamed from doc/src/snippets/declarative/anchoranimation.qml)0
-rw-r--r--doc/src/snippets/qml/anchorchanges.qml (renamed from doc/src/snippets/declarative/anchorchanges.qml)0
-rw-r--r--doc/src/snippets/qml/animatedimage.qml (renamed from doc/src/snippets/declarative/animatedimage.qml)0
-rw-r--r--doc/src/snippets/qml/animation.qml (renamed from doc/src/snippets/declarative/animation.qml)0
-rw-r--r--doc/src/snippets/qml/application.qml (renamed from doc/src/snippets/declarative/application.qml)0
-rw-r--r--doc/src/snippets/qml/behavior.qml (renamed from doc/src/snippets/declarative/behavior.qml)0
-rw-r--r--doc/src/snippets/qml/borderimage/borderimage-scaled.qml (renamed from doc/src/snippets/declarative/borderimage/borderimage-scaled.qml)0
-rw-r--r--doc/src/snippets/qml/borderimage/borderimage-tiled.qml (renamed from doc/src/snippets/declarative/borderimage/borderimage-tiled.qml)0
-rw-r--r--doc/src/snippets/qml/borderimage/normal-image.qml (renamed from doc/src/snippets/declarative/borderimage/normal-image.qml)0
-rw-r--r--doc/src/snippets/qml/codingconventions/dotproperties.qml (renamed from doc/src/snippets/declarative/codingconventions/dotproperties.qml)0
-rw-r--r--doc/src/snippets/qml/codingconventions/javascript-imports.qml (renamed from doc/src/snippets/declarative/codingconventions/javascript-imports.qml)0
-rw-r--r--doc/src/snippets/qml/codingconventions/javascript.qml (renamed from doc/src/snippets/declarative/codingconventions/javascript.qml)0
-rw-r--r--doc/src/snippets/qml/codingconventions/lists.qml (renamed from doc/src/snippets/declarative/codingconventions/lists.qml)0
-rw-r--r--doc/src/snippets/qml/codingconventions/myscript.js (renamed from doc/src/snippets/declarative/codingconventions/myscript.js)0
-rw-r--r--doc/src/snippets/qml/codingconventions/photo.qml (renamed from doc/src/snippets/declarative/codingconventions/photo.qml)0
-rw-r--r--doc/src/snippets/qml/codingconventions/private.qml (renamed from doc/src/snippets/declarative/codingconventions/private.qml)0
-rw-r--r--doc/src/snippets/qml/coloranimation.qml (renamed from doc/src/snippets/declarative/coloranimation.qml)0
-rw-r--r--doc/src/snippets/qml/colors.qml (renamed from doc/src/snippets/declarative/colors.qml)0
-rw-r--r--doc/src/snippets/qml/column/column-transitions.qml (renamed from doc/src/snippets/declarative/column/column-transitions.qml)0
-rw-r--r--doc/src/snippets/qml/column/column.qml (renamed from doc/src/snippets/declarative/column/column.qml)0
-rw-r--r--doc/src/snippets/qml/column/vertical-positioner.qml (renamed from doc/src/snippets/declarative/column/vertical-positioner.qml)0
-rw-r--r--doc/src/snippets/qml/comments.qml (renamed from doc/src/snippets/declarative/comments.qml)0
-rw-r--r--doc/src/snippets/qml/component.qml (renamed from doc/src/snippets/declarative/component.qml)0
-rw-r--r--doc/src/snippets/qml/componentCreation.js (renamed from doc/src/snippets/declarative/componentCreation.js)0
-rw-r--r--doc/src/snippets/qml/createComponent-simple.qml (renamed from doc/src/snippets/declarative/createComponent-simple.qml)0
-rw-r--r--doc/src/snippets/qml/createComponent.qml (renamed from doc/src/snippets/declarative/createComponent.qml)0
-rw-r--r--doc/src/snippets/qml/createQmlObject.qml (renamed from doc/src/snippets/declarative/createQmlObject.qml)0
-rw-r--r--doc/src/snippets/qml/drag.qml (renamed from doc/src/snippets/declarative/drag.qml)0
-rw-r--r--doc/src/snippets/qml/dynamicObjects-destroy.qml (renamed from doc/src/snippets/declarative/dynamicObjects-destroy.qml)0
-rw-r--r--doc/src/snippets/qml/events.qml (renamed from doc/src/snippets/declarative/events.qml)0
-rw-r--r--doc/src/snippets/qml/flickable.qml (renamed from doc/src/snippets/declarative/flickable.qml)0
-rw-r--r--doc/src/snippets/qml/flickableScrollbar.qml (renamed from doc/src/snippets/declarative/flickableScrollbar.qml)0
-rw-r--r--doc/src/snippets/qml/flipable/flipable.qml (renamed from doc/src/snippets/declarative/flipable/flipable.qml)0
-rw-r--r--doc/src/snippets/qml/flow.qml (renamed from doc/src/snippets/declarative/flow.qml)0
-rw-r--r--doc/src/snippets/qml/focus/MyClickableWidget.qml (renamed from doc/src/snippets/declarative/focus/MyClickableWidget.qml)0
-rw-r--r--doc/src/snippets/qml/focus/MyWidget.qml (renamed from doc/src/snippets/declarative/focus/MyWidget.qml)0
-rw-r--r--doc/src/snippets/qml/focus/advancedFocus.qml (renamed from doc/src/snippets/declarative/focus/advancedFocus.qml)0
-rw-r--r--doc/src/snippets/qml/focus/basicwidget.qml (renamed from doc/src/snippets/declarative/focus/basicwidget.qml)0
-rw-r--r--doc/src/snippets/qml/focus/clickablewidget.qml (renamed from doc/src/snippets/declarative/focus/clickablewidget.qml)0
-rw-r--r--doc/src/snippets/qml/focus/myfocusscopewidget.qml (renamed from doc/src/snippets/declarative/focus/myfocusscopewidget.qml)0
-rw-r--r--doc/src/snippets/qml/focus/rectangle.qml (renamed from doc/src/snippets/declarative/focus/rectangle.qml)0
-rw-r--r--doc/src/snippets/qml/focus/widget.qml (renamed from doc/src/snippets/declarative/focus/widget.qml)0
-rw-r--r--doc/src/snippets/qml/folderlistmodel.qml (renamed from doc/src/snippets/declarative/folderlistmodel.qml)0
-rw-r--r--doc/src/snippets/qml/gradient.qml (renamed from doc/src/snippets/declarative/gradient.qml)0
-rw-r--r--doc/src/snippets/qml/grid-spacing.qml (renamed from doc/src/snippets/declarative/grid-spacing.qml)0
-rw-r--r--doc/src/snippets/qml/grid/grid-items.qml (renamed from doc/src/snippets/declarative/grid/grid-items.qml)0
-rw-r--r--doc/src/snippets/qml/grid/grid-no-spacing.qml (renamed from doc/src/snippets/declarative/grid/grid-no-spacing.qml)0
-rw-r--r--doc/src/snippets/qml/grid/grid-spacing.qml (renamed from doc/src/snippets/declarative/grid/grid-spacing.qml)0
-rw-r--r--doc/src/snippets/qml/grid/grid.qml (renamed from doc/src/snippets/declarative/grid/grid.qml)0
-rw-r--r--doc/src/snippets/qml/gridview/ContactModel.qml (renamed from doc/src/snippets/declarative/gridview/ContactModel.qml)0
-rw-r--r--doc/src/snippets/qml/gridview/gridview.qml (renamed from doc/src/snippets/declarative/gridview/gridview.qml)0
-rw-r--r--doc/src/snippets/qml/image.qml (renamed from doc/src/snippets/declarative/image.qml)0
-rw-r--r--doc/src/snippets/qml/imports/chart.qml (renamed from doc/src/snippets/declarative/imports/chart.qml)0
-rw-r--r--doc/src/snippets/qml/imports/installed-module.qml (renamed from doc/src/snippets/declarative/imports/installed-module.qml)0
-rw-r--r--doc/src/snippets/qml/imports/merged-named-imports.qml (renamed from doc/src/snippets/declarative/imports/merged-named-imports.qml)0
-rw-r--r--doc/src/snippets/qml/imports/named-imports.qml (renamed from doc/src/snippets/declarative/imports/named-imports.qml)0
-rw-r--r--doc/src/snippets/qml/imports/network-imports.qml (renamed from doc/src/snippets/declarative/imports/network-imports.qml)0
-rw-r--r--doc/src/snippets/qml/imports/qtquick-1.0.qml (renamed from doc/src/snippets/declarative/imports/qtquick-1.0.qml)0
-rw-r--r--doc/src/snippets/qml/imports/timeexample.qml (renamed from doc/src/snippets/declarative/imports/timeexample.qml)0
-rw-r--r--doc/src/snippets/qml/integrating-javascript/connectjs.qml (renamed from doc/src/snippets/declarative/integrating-javascript/connectjs.qml)0
-rw-r--r--doc/src/snippets/qml/integrating-javascript/includejs/app.qml (renamed from doc/src/snippets/declarative/integrating-javascript/includejs/app.qml)0
-rw-r--r--doc/src/snippets/qml/integrating-javascript/includejs/factorial.js (renamed from doc/src/snippets/declarative/integrating-javascript/includejs/factorial.js)0
-rw-r--r--doc/src/snippets/qml/integrating-javascript/includejs/script.js (renamed from doc/src/snippets/declarative/integrating-javascript/includejs/script.js)0
-rw-r--r--doc/src/snippets/qml/integrating-javascript/scarceresources/avatarExample.cpp (renamed from doc/src/snippets/declarative/integrating-javascript/scarceresources/avatarExample.cpp)14
-rw-r--r--doc/src/snippets/qml/integrating-javascript/scarceresources/avatarExample.h (renamed from doc/src/snippets/declarative/integrating-javascript/scarceresources/avatarExample.h)0
-rw-r--r--doc/src/snippets/qml/integrating-javascript/scarceresources/exampleFive.qml (renamed from doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleFive.qml)0
-rw-r--r--doc/src/snippets/qml/integrating-javascript/scarceresources/exampleFour.js (renamed from doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleFour.js)0
-rw-r--r--doc/src/snippets/qml/integrating-javascript/scarceresources/exampleFour.qml (renamed from doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleFour.qml)0
-rw-r--r--doc/src/snippets/qml/integrating-javascript/scarceresources/exampleOne.qml (renamed from doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleOne.qml)0
-rw-r--r--doc/src/snippets/qml/integrating-javascript/scarceresources/exampleThree.js (renamed from doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleThree.js)0
-rw-r--r--doc/src/snippets/qml/integrating-javascript/scarceresources/exampleThree.qml (renamed from doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleThree.qml)0
-rw-r--r--doc/src/snippets/qml/integrating-javascript/scarceresources/exampleTwo.qml (renamed from doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleTwo.qml)0
-rw-r--r--doc/src/snippets/qml/integrating-javascript/script.js (renamed from doc/src/snippets/declarative/integrating-javascript/script.js)0
-rw-r--r--doc/src/snippets/qml/keynavigation.qml (renamed from doc/src/snippets/declarative/keynavigation.qml)0
-rw-r--r--doc/src/snippets/qml/keys/keys-handler.qml (renamed from doc/src/snippets/declarative/keys/keys-handler.qml)0
-rw-r--r--doc/src/snippets/qml/keys/keys-pressed.qml (renamed from doc/src/snippets/declarative/keys/keys-pressed.qml)0
-rw-r--r--doc/src/snippets/qml/layoutmirroring.qml (renamed from doc/src/snippets/declarative/layoutmirroring.qml)0
-rw-r--r--doc/src/snippets/qml/listmodel-modify.qml (renamed from doc/src/snippets/declarative/listmodel-modify.qml)0
-rw-r--r--doc/src/snippets/qml/listmodel-nested.qml (renamed from doc/src/snippets/declarative/listmodel-nested.qml)0
-rw-r--r--doc/src/snippets/qml/listmodel-simple.qml (renamed from doc/src/snippets/declarative/listmodel-simple.qml)0
-rw-r--r--doc/src/snippets/qml/listmodel.qml (renamed from doc/src/snippets/declarative/listmodel.qml)0
-rw-r--r--doc/src/snippets/qml/listview-decorations.qml (renamed from doc/src/snippets/declarative/listview-decorations.qml)0
-rw-r--r--doc/src/snippets/qml/listview-sections.qml (renamed from doc/src/snippets/declarative/listview-sections.qml)0
-rw-r--r--doc/src/snippets/qml/listview.qml (renamed from doc/src/snippets/declarative/listview.qml)0
-rw-r--r--doc/src/snippets/qml/listview/ContactModel.qml (renamed from doc/src/snippets/declarative/listview/ContactModel.qml)0
-rw-r--r--doc/src/snippets/qml/listview/listview-snippet.qml (renamed from doc/src/snippets/declarative/listview/listview-snippet.qml)0
-rw-r--r--doc/src/snippets/qml/listview/listview.qml (renamed from doc/src/snippets/declarative/listview/listview.qml)0
-rw-r--r--doc/src/snippets/qml/loader/KeyReader.qml (renamed from doc/src/snippets/declarative/loader/KeyReader.qml)0
-rw-r--r--doc/src/snippets/qml/loader/MyItem.qml (renamed from doc/src/snippets/declarative/loader/MyItem.qml)0
-rw-r--r--doc/src/snippets/qml/loader/connections.qml (renamed from doc/src/snippets/declarative/loader/connections.qml)0
-rw-r--r--doc/src/snippets/qml/loader/focus.qml (renamed from doc/src/snippets/declarative/loader/focus.qml)0
-rw-r--r--doc/src/snippets/qml/loader/simple.qml (renamed from doc/src/snippets/declarative/loader/simple.qml)0
-rw-r--r--doc/src/snippets/qml/loader/sizeitem.qml (renamed from doc/src/snippets/declarative/loader/sizeitem.qml)0
-rw-r--r--doc/src/snippets/qml/loader/sizeloader.qml (renamed from doc/src/snippets/declarative/loader/sizeloader.qml)0
-rw-r--r--doc/src/snippets/qml/models/views-models-delegates.qml (renamed from doc/src/snippets/declarative/models/views-models-delegates.qml)0
-rw-r--r--doc/src/snippets/qml/models/visual-model-and-view.qml (renamed from doc/src/snippets/declarative/models/visual-model-and-view.qml)0
-rw-r--r--doc/src/snippets/qml/mousearea/mousearea-snippet.qml (renamed from doc/src/snippets/declarative/mousearea/mousearea-snippet.qml)0
-rw-r--r--doc/src/snippets/qml/mousearea/mousearea.qml (renamed from doc/src/snippets/declarative/mousearea/mousearea.qml)0
-rw-r--r--doc/src/snippets/qml/mousearea/mouseareadragfilter.qml (renamed from doc/src/snippets/declarative/mousearea/mouseareadragfilter.qml)0
-rw-r--r--doc/src/snippets/qml/multipointtoucharea/multipointtoucharea.qml (renamed from doc/src/snippets/declarative/multipointtoucharea/multipointtoucharea.qml)0
-rw-r--r--doc/src/snippets/qml/numberanimation.qml (renamed from doc/src/snippets/declarative/numberanimation.qml)0
-rw-r--r--doc/src/snippets/qml/parallelanimation.qml (renamed from doc/src/snippets/declarative/parallelanimation.qml)0
-rw-r--r--doc/src/snippets/qml/parentanimation.qml (renamed from doc/src/snippets/declarative/parentanimation.qml)0
-rw-r--r--doc/src/snippets/qml/parentchange.qml (renamed from doc/src/snippets/declarative/parentchange.qml)0
-rw-r--r--doc/src/snippets/qml/path/arcdirection.qml (renamed from doc/src/snippets/declarative/path/arcdirection.qml)0
-rw-r--r--doc/src/snippets/qml/path/arcradius.qml (renamed from doc/src/snippets/declarative/path/arcradius.qml)0
-rw-r--r--doc/src/snippets/qml/path/basicarc.qml (renamed from doc/src/snippets/declarative/path/basicarc.qml)0
-rw-r--r--doc/src/snippets/qml/path/basiccurve.qml (renamed from doc/src/snippets/declarative/path/basiccurve.qml)0
-rw-r--r--doc/src/snippets/qml/path/largearc.qml (renamed from doc/src/snippets/declarative/path/largearc.qml)0
-rw-r--r--doc/src/snippets/qml/pathinterpolator.qml (renamed from doc/src/snippets/declarative/pathinterpolator.qml)0
-rw-r--r--doc/src/snippets/qml/pathview/ContactModel.qml (renamed from doc/src/snippets/declarative/pathview/ContactModel.qml)0
-rw-r--r--doc/src/snippets/qml/pathview/pathattributes.qml (renamed from doc/src/snippets/declarative/pathview/pathattributes.qml)0
-rw-r--r--doc/src/snippets/qml/pathview/pathview.qml (renamed from doc/src/snippets/declarative/pathview/pathview.qml)0
-rw-r--r--doc/src/snippets/qml/properties.qml (renamed from doc/src/snippets/declarative/properties.qml)0
-rw-r--r--doc/src/snippets/qml/propertyaction-sequential.qml (renamed from doc/src/snippets/declarative/propertyaction-sequential.qml)0
-rw-r--r--doc/src/snippets/qml/propertyaction.qml (renamed from doc/src/snippets/declarative/propertyaction.qml)0
-rw-r--r--doc/src/snippets/qml/propertyanimation.qml (renamed from doc/src/snippets/declarative/propertyanimation.qml)0
-rw-r--r--doc/src/snippets/qml/propertychanges.qml (renamed from doc/src/snippets/declarative/propertychanges.qml)0
-rw-r--r--doc/src/snippets/qml/qml-data-models/dynamic-listmodel.qml (renamed from doc/src/snippets/declarative/qml-data-models/dynamic-listmodel.qml)0
-rw-r--r--doc/src/snippets/qml/qml-data-models/listelements.qml (renamed from doc/src/snippets/declarative/qml-data-models/listelements.qml)0
-rw-r--r--doc/src/snippets/qml/qml-data-models/listmodel-listview.qml (renamed from doc/src/snippets/declarative/qml-data-models/listmodel-listview.qml)0
-rw-r--r--doc/src/snippets/qml/qml-documents/inline-component.qml (renamed from doc/src/snippets/declarative/qml-documents/inline-component.qml)0
-rw-r--r--doc/src/snippets/qml/qml-documents/inline-text-component.qml (renamed from doc/src/snippets/declarative/qml-documents/inline-text-component.qml)0
-rw-r--r--doc/src/snippets/qml/qml-documents/non-trivial.qml (renamed from doc/src/snippets/declarative/qml-documents/non-trivial.qml)0
-rw-r--r--doc/src/snippets/qml/qml-documents/qmldocuments.qml (renamed from doc/src/snippets/declarative/qml-documents/qmldocuments.qml)0
-rw-r--r--doc/src/snippets/qml/qml-intro/images/qt-logo.svg (renamed from doc/src/snippets/declarative/qml-intro/images/qt-logo.svg)0
-rw-r--r--doc/src/snippets/qml/qtbinding/context-advanced/MyItem.qml (renamed from doc/src/snippets/declarative/qtbinding/context-advanced/MyItem.qml)0
-rw-r--r--doc/src/snippets/qml/qtbinding/context-advanced/applicationdata.h (renamed from doc/src/snippets/declarative/qtbinding/context-advanced/applicationdata.h)0
-rw-r--r--doc/src/snippets/qml/qtbinding/context-advanced/connections.qml (renamed from doc/src/snippets/declarative/qtbinding/context-advanced/connections.qml)0
-rw-r--r--doc/src/snippets/qml/qtbinding/context-advanced/main.cpp (renamed from doc/src/snippets/declarative/qtbinding/context-advanced/main.cpp)4
-rw-r--r--doc/src/snippets/qml/qtbinding/context/MyItem.qml (renamed from doc/src/snippets/declarative/qtbinding/context/MyItem.qml)0
-rw-r--r--doc/src/snippets/qml/qtbinding/context/main.cpp (renamed from doc/src/snippets/declarative/qtbinding/context/main.cpp)4
-rw-r--r--doc/src/snippets/qml/qtbinding/enums/imageviewer.h (renamed from doc/src/snippets/declarative/qtbinding/enums/imageviewer.h)6
-rw-r--r--doc/src/snippets/qml/qtbinding/enums/standalone.qml (renamed from doc/src/snippets/declarative/qtbinding/enums/standalone.qml)0
-rw-r--r--doc/src/snippets/qml/qtbinding/functions-cpp/MyItem.qml (renamed from doc/src/snippets/declarative/qtbinding/functions-cpp/MyItem.qml)0
-rw-r--r--doc/src/snippets/qml/qtbinding/functions-cpp/main.cpp (renamed from doc/src/snippets/declarative/qtbinding/functions-cpp/main.cpp)4
-rw-r--r--doc/src/snippets/qml/qtbinding/functions-cpp/myclass.h (renamed from doc/src/snippets/declarative/qtbinding/functions-cpp/myclass.h)0
-rw-r--r--doc/src/snippets/qml/qtbinding/functions-qml/MyItem.qml (renamed from doc/src/snippets/declarative/qtbinding/functions-qml/MyItem.qml)0
-rw-r--r--doc/src/snippets/qml/qtbinding/functions-qml/main.cpp (renamed from doc/src/snippets/declarative/qtbinding/functions-qml/main.cpp)6
-rw-r--r--doc/src/snippets/qml/qtbinding/loading/MyItem.qml (renamed from doc/src/snippets/declarative/qtbinding/loading/MyItem.qml)0
-rw-r--r--doc/src/snippets/qml/qtbinding/loading/main.cpp (renamed from doc/src/snippets/declarative/qtbinding/loading/main.cpp)28
-rw-r--r--doc/src/snippets/qml/qtbinding/newelements/imageviewer.h (renamed from doc/src/snippets/declarative/qtbinding/newelements/imageviewer.h)4
-rw-r--r--doc/src/snippets/qml/qtbinding/newelements/main.cpp (renamed from doc/src/snippets/declarative/qtbinding/newelements/main.cpp)4
-rw-r--r--doc/src/snippets/qml/qtbinding/newelements/standalone.qml (renamed from doc/src/snippets/declarative/qtbinding/newelements/standalone.qml)0
-rw-r--r--doc/src/snippets/qml/qtbinding/properties-cpp/MyItem.qml (renamed from doc/src/snippets/declarative/qtbinding/properties-cpp/MyItem.qml)0
-rw-r--r--doc/src/snippets/qml/qtbinding/properties-cpp/applicationdata.h (renamed from doc/src/snippets/declarative/qtbinding/properties-cpp/applicationdata.h)0
-rw-r--r--doc/src/snippets/qml/qtbinding/properties-qml/MyItem.qml (renamed from doc/src/snippets/declarative/qtbinding/properties-qml/MyItem.qml)0
-rw-r--r--doc/src/snippets/qml/qtbinding/properties-qml/main.cpp (renamed from doc/src/snippets/declarative/qtbinding/properties-qml/main.cpp)10
-rw-r--r--doc/src/snippets/qml/qtbinding/resources/example.qrc (renamed from doc/src/snippets/declarative/qtbinding/resources/example.qrc)0
-rw-r--r--doc/src/snippets/qml/qtbinding/resources/main.cpp (renamed from doc/src/snippets/declarative/qtbinding/resources/main.cpp)6
-rw-r--r--doc/src/snippets/qml/qtbinding/resources/main.qml (renamed from doc/src/snippets/declarative/qtbinding/resources/main.qml)0
-rw-r--r--doc/src/snippets/qml/qtbinding/resources/resources.pro (renamed from doc/src/snippets/declarative/qtbinding/resources/resources.pro)2
-rw-r--r--doc/src/snippets/qml/qtbinding/signals-cpp/MyItem.qml (renamed from doc/src/snippets/declarative/qtbinding/signals-cpp/MyItem.qml)0
-rw-r--r--doc/src/snippets/qml/qtbinding/signals-cpp/imageviewer.h (renamed from doc/src/snippets/declarative/qtbinding/signals-cpp/imageviewer.h)6
-rw-r--r--doc/src/snippets/qml/qtbinding/signals-cpp/main.cpp (renamed from doc/src/snippets/declarative/qtbinding/signals-cpp/main.cpp)10
-rw-r--r--doc/src/snippets/qml/qtbinding/signals-cpp/standalone.qml (renamed from doc/src/snippets/declarative/qtbinding/signals-cpp/standalone.qml)0
-rw-r--r--doc/src/snippets/qml/qtbinding/signals-qml/MyItem.qml (renamed from doc/src/snippets/declarative/qtbinding/signals-qml/MyItem.qml)0
-rw-r--r--doc/src/snippets/qml/qtbinding/signals-qml/main.cpp (renamed from doc/src/snippets/declarative/qtbinding/signals-qml/main.cpp)4
-rw-r--r--doc/src/snippets/qml/qtbinding/signals-qml/myclass.h (renamed from doc/src/snippets/declarative/qtbinding/signals-qml/myclass.h)0
-rw-r--r--doc/src/snippets/qml/qtbinding/variantlistmap/MyItem.qml (renamed from doc/src/snippets/declarative/qtbinding/variantlistmap/MyItem.qml)0
-rw-r--r--doc/src/snippets/qml/qtbinding/variantlistmap/main.cpp (renamed from doc/src/snippets/declarative/qtbinding/variantlistmap/main.cpp)4
-rw-r--r--doc/src/snippets/qml/qtobject.qml (renamed from doc/src/snippets/declarative/qtobject.qml)0
-rw-r--r--doc/src/snippets/qml/rectangle/rect-border-width.qml (renamed from doc/src/snippets/declarative/rectangle/rect-border-width.qml)0
-rw-r--r--doc/src/snippets/qml/rectangle/rectangle-colors.qml (renamed from doc/src/snippets/declarative/rectangle/rectangle-colors.qml)0
-rw-r--r--doc/src/snippets/qml/rectangle/rectangle-gradient.qml (renamed from doc/src/snippets/declarative/rectangle/rectangle-gradient.qml)0
-rw-r--r--doc/src/snippets/qml/rectangle/rectangle.qml (renamed from doc/src/snippets/declarative/rectangle/rectangle.qml)0
-rw-r--r--doc/src/snippets/qml/repeaters/repeater-grid-index.qml (renamed from doc/src/snippets/declarative/repeaters/repeater-grid-index.qml)0
-rw-r--r--doc/src/snippets/qml/repeaters/repeater.qml (renamed from doc/src/snippets/declarative/repeaters/repeater.qml)0
-rw-r--r--doc/src/snippets/qml/reusablecomponents/Button.qml (renamed from doc/src/snippets/declarative/reusablecomponents/Button.qml)0
-rw-r--r--doc/src/snippets/qml/reusablecomponents/application.qml (renamed from doc/src/snippets/declarative/reusablecomponents/application.qml)0
-rw-r--r--doc/src/snippets/qml/reusablecomponents/component.qml (renamed from doc/src/snippets/declarative/reusablecomponents/component.qml)0
-rw-r--r--doc/src/snippets/qml/reusablecomponents/focusbutton.qml (renamed from doc/src/snippets/declarative/reusablecomponents/focusbutton.qml)0
-rw-r--r--doc/src/snippets/qml/reusablecomponents/qmldir (renamed from doc/src/snippets/declarative/reusablecomponents/qmldir)0
-rw-r--r--doc/src/snippets/qml/righttoleft.qml (renamed from doc/src/snippets/declarative/righttoleft.qml)0
-rw-r--r--doc/src/snippets/qml/righttoleft/Child.qml (renamed from doc/src/snippets/declarative/righttoleft/Child.qml)0
-rw-r--r--doc/src/snippets/qml/rotation.qml (renamed from doc/src/snippets/declarative/rotation.qml)0
-rw-r--r--doc/src/snippets/qml/rotationanimation.qml (renamed from doc/src/snippets/declarative/rotationanimation.qml)0
-rw-r--r--doc/src/snippets/qml/row.qml (renamed from doc/src/snippets/declarative/row.qml)0
-rw-r--r--doc/src/snippets/qml/row/row.qml (renamed from doc/src/snippets/declarative/row/row.qml)0
-rw-r--r--doc/src/snippets/qml/script.js (renamed from doc/src/snippets/declarative/script.js)0
-rw-r--r--doc/src/snippets/qml/sequentialanimation.qml (renamed from doc/src/snippets/declarative/sequentialanimation.qml)0
-rw-r--r--doc/src/snippets/qml/smoothedanimation.qml (renamed from doc/src/snippets/declarative/smoothedanimation.qml)0
-rw-r--r--doc/src/snippets/qml/springanimation.qml (renamed from doc/src/snippets/declarative/springanimation.qml)0
-rw-r--r--doc/src/snippets/qml/state-when.qml (renamed from doc/src/snippets/declarative/state-when.qml)0
-rw-r--r--doc/src/snippets/qml/state.qml (renamed from doc/src/snippets/declarative/state.qml)0
-rw-r--r--doc/src/snippets/qml/states.qml (renamed from doc/src/snippets/declarative/states.qml)0
-rw-r--r--doc/src/snippets/qml/states/statechangescript.qml (renamed from doc/src/snippets/declarative/states/statechangescript.qml)0
-rw-r--r--doc/src/snippets/qml/systempalette.qml (renamed from doc/src/snippets/declarative/systempalette.qml)0
-rw-r--r--doc/src/snippets/qml/text/onLinkActivated.qml (renamed from doc/src/snippets/declarative/text/onLinkActivated.qml)2
-rw-r--r--doc/src/snippets/qml/texthandling.qml (renamed from doc/src/snippets/declarative/texthandling.qml)0
-rw-r--r--doc/src/snippets/qml/transition-from-to-modified.qml (renamed from doc/src/snippets/declarative/transition-from-to-modified.qml)0
-rw-r--r--doc/src/snippets/qml/transition-from-to.qml (renamed from doc/src/snippets/declarative/transition-from-to.qml)0
-rw-r--r--doc/src/snippets/qml/transition-reversible.qml (renamed from doc/src/snippets/declarative/transition-reversible.qml)0
-rw-r--r--doc/src/snippets/qml/transition.qml (renamed from doc/src/snippets/declarative/transition.qml)0
-rw-r--r--doc/src/snippets/qml/transitions-list.qml (renamed from doc/src/snippets/declarative/transitions-list.qml)0
-rw-r--r--doc/src/snippets/qml/viewtransitions/viewtransitions-basic.qml (renamed from doc/src/snippets/declarative/viewtransitions/viewtransitions-basic.qml)0
-rw-r--r--doc/src/snippets/qml/viewtransitions/viewtransitions-delayedbyindex.qml (renamed from doc/src/snippets/declarative/viewtransitions/viewtransitions-delayedbyindex.qml)0
-rw-r--r--doc/src/snippets/qml/viewtransitions/viewtransitions-intermediatemove.qml (renamed from doc/src/snippets/declarative/viewtransitions/viewtransitions-intermediatemove.qml)0
-rw-r--r--doc/src/snippets/qml/viewtransitions/viewtransitions-interruptedgood.qml (renamed from doc/src/snippets/declarative/viewtransitions/viewtransitions-interruptedgood.qml)0
-rw-r--r--doc/src/snippets/qml/viewtransitions/viewtransitions-pathanim.qml (renamed from doc/src/snippets/declarative/viewtransitions/viewtransitions-pathanim.qml)0
-rw-r--r--doc/src/snippets/qml/viewtransitions/viewtransitions-scriptactionbad.qml (renamed from doc/src/snippets/declarative/viewtransitions/viewtransitions-scriptactionbad.qml)0
-rw-r--r--doc/src/snippets/qml/viewtransitions/viewtransitions-scriptactiongood.qml (renamed from doc/src/snippets/declarative/viewtransitions/viewtransitions-scriptactiongood.qml)0
-rw-r--r--doc/src/snippets/qml/visualdatagroup.qml (renamed from doc/src/snippets/declarative/visualdatagroup.qml)0
-rw-r--r--doc/src/snippets/qml/visualdatamodel.qml (renamed from doc/src/snippets/declarative/visualdatamodel.qml)0
-rw-r--r--doc/src/snippets/qml/visualdatamodel_rootindex/main.cpp (renamed from doc/src/snippets/declarative/visualdatamodel_rootindex/main.cpp)8
-rw-r--r--doc/src/snippets/qml/visualdatamodel_rootindex/view.qml (renamed from doc/src/snippets/declarative/visualdatamodel_rootindex/view.qml)0
-rw-r--r--doc/src/snippets/qml/workerscript.qml (renamed from doc/src/snippets/declarative/workerscript.qml)0
-rw-r--r--doc/src/snippets/qml/xmlrole.qml (renamed from doc/src/snippets/declarative/xmlrole.qml)0
-rw-r--r--doc/src/snippets/qml/xmlrole.xml (renamed from doc/src/snippets/declarative/xmlrole.xml)0
-rw-r--r--doc/src/snippets/qtjavascript/evaluation/main.cpp2
-rw-r--r--doc/src/snippets/qtjavascript/registeringobjects/main.cpp2
-rw-r--r--doc/src/snippets/qtjavascript/registeringvalues/main.cpp2
-rw-r--r--doc/src/whatsnew.qdoc4
252 files changed, 533 insertions, 533 deletions
diff --git a/doc/src/localstorage/localstorage.qdoc b/doc/src/localstorage/localstorage.qdoc
index bee491f9b9..406de25339 100644
--- a/doc/src/localstorage/localstorage.qdoc
+++ b/doc/src/localstorage/localstorage.qdoc
@@ -43,7 +43,7 @@ provide the ability to access local storage in an SQL database.
These databases are user-specific and QML-specific, but accessible to all QML applications.
They are stored in the \c Databases subdirectory
-of QDeclarativeEngine::offlineStoragePath(), currently as SQLite databases.
+of QQmlEngine::offlineStoragePath(), currently as SQLite databases.
Database connections are automatically closed during Javascript garbage collection.
diff --git a/doc/src/qml/basictypes.qdoc b/doc/src/qml/basictypes.qdoc
index 150383fdc2..0f66a96731 100644
--- a/doc/src/qml/basictypes.qdoc
+++ b/doc/src/qml/basictypes.qdoc
@@ -180,7 +180,7 @@
\div{float-right}
\inlineimage declarative-colors.png
\enddiv
- \snippet doc/src/snippets/declarative/colors.qml colors
+ \snippet doc/src/snippets/qml/colors.qml colors
Or with the \l{QML:Qt::rgba()}{Qt.rgba()}, \l{QML:Qt::hsla()}{Qt.hsla()}, \l{QML:Qt::darker()}{Qt.darker()},
\l{QML:Qt::lighter()}{Qt.lighter()} or \l{QML:Qt::tint()}{Qt.tint()} functions:
diff --git a/doc/src/qml/c++models.qdoc b/doc/src/qml/c++models.qdoc
index e2498134fe..943c79c184 100644
--- a/doc/src/qml/c++models.qdoc
+++ b/doc/src/qml/c++models.qdoc
@@ -57,7 +57,7 @@ models.
\bold{Note:} There is no way for the view to know that the contents of a QStringList
have changed. If the QStringList changes, it will be necessary to reset
- the model by calling QDeclarativeContext::setContextProperty() again.
+ the model by calling QQmlContext::setContextProperty() again.
\section1 QObjectList-based model
@@ -92,7 +92,7 @@ models.
Note: There is no way for the view to know that the contents of a QList
have changed. If the QList changes, it will be necessary to reset
- the model by calling QDeclarativeContext::setContextProperty() again.
+ the model by calling QQmlContext::setContextProperty() again.
\section1 QAbstractItemModel
@@ -160,10 +160,10 @@ models.
\section1 Exposing C++ Data Models to QML
-The above examples use QDeclarativeContext::setContextProperty() to set
+The above examples use QQmlContext::setContextProperty() to set
model values directly in QML components. An alternative to this is to
register the C++ model class as a QML type from a QML C++ plugin using
-QDeclarativeExtensionPlugin. This would allow the model classes to be
+QQmlExtensionPlugin. This would allow the model classes to be
created directly as elements within QML:
\table
@@ -171,7 +171,7 @@ created directly as elements within QML:
\o
\code
-class MyModelPlugin : public QDeclarativeExtensionPlugin
+class MyModelPlugin : public QQmlExtensionPlugin
{
public:
void registerTypes(const char *uri)
diff --git a/doc/src/qml/codingconventions.qdoc b/doc/src/qml/codingconventions.qdoc
index 89fdfd59f9..9e1ce34c2c 100644
--- a/doc/src/qml/codingconventions.qdoc
+++ b/doc/src/qml/codingconventions.qdoc
@@ -52,7 +52,7 @@ For better readability, we separate these different parts with an empty line.
For example, a hypothetical \i photo QML object would look like this:
-\snippet doc/src/snippets/declarative/codingconventions/photo.qml 0
+\snippet doc/src/snippets/qml/codingconventions/photo.qml 0
\section1 Grouped Properties
@@ -62,11 +62,11 @@ we use the \i {group notation} rather than the \i {dot notation} to improve read
For example, this:
-\snippet doc/src/snippets/declarative/codingconventions/dotproperties.qml 0
+\snippet doc/src/snippets/qml/codingconventions/dotproperties.qml 0
can be written like this:
-\snippet doc/src/snippets/declarative/codingconventions/dotproperties.qml 1
+\snippet doc/src/snippets/qml/codingconventions/dotproperties.qml 1
\section1 Private Properties
@@ -78,7 +78,7 @@ the implementation. As a convention, private properties begin with two
accessible but is not meant for public use. Note that QML and JavaScript will
grant the user access to these properties.
-\snippet doc/src/snippets/declarative/codingconventions/private.qml 0
+\snippet doc/src/snippets/qml/codingconventions/private.qml 0
\section1 Lists
@@ -89,30 +89,30 @@ For example, it is very common for a component to only have one state.
In this case, instead of:
-\snippet doc/src/snippets/declarative/codingconventions/lists.qml 0
+\snippet doc/src/snippets/qml/codingconventions/lists.qml 0
we will write this:
-\snippet doc/src/snippets/declarative/codingconventions/lists.qml 1
+\snippet doc/src/snippets/qml/codingconventions/lists.qml 1
\section1 JavaScript Code
If the script is a single expression, we recommend writing it inline:
-\snippet doc/src/snippets/declarative/codingconventions/javascript.qml 0
+\snippet doc/src/snippets/qml/codingconventions/javascript.qml 0
If the script is only a couple of lines long, we generally use a block:
-\snippet doc/src/snippets/declarative/codingconventions/javascript.qml 1
+\snippet doc/src/snippets/qml/codingconventions/javascript.qml 1
If the script is more than a couple of lines long or can be used by different objects, we recommend creating a function and calling it like this:
-\snippet doc/src/snippets/declarative/codingconventions/javascript.qml 2
+\snippet doc/src/snippets/qml/codingconventions/javascript.qml 2
For long scripts, we will put the functions in their own JavaScript file and import it like this:
-\snippet doc/src/snippets/declarative/codingconventions/javascript-imports.qml 0
+\snippet doc/src/snippets/qml/codingconventions/javascript-imports.qml 0
*/
diff --git a/doc/src/qml/debugging.qdoc b/doc/src/qml/debugging.qdoc
index 520e23abb5..562464a419 100644
--- a/doc/src/qml/debugging.qdoc
+++ b/doc/src/qml/debugging.qdoc
@@ -148,11 +148,11 @@ If you set \c {QML_IMPORT_TRACE=1} before running the \l {QML Viewer}
(or your QML C++ application), you will see output similar to this:
\code
-QDeclarativeImportDatabase::addImportPath "/qt-sdk/imports"
-QDeclarativeImportDatabase::addImportPath "/qt-sdk/bin/QMLViewer.app/Contents/MacOS"
-QDeclarativeImportDatabase::addToImport 0x106237370 "." -1.-1 File as ""
-QDeclarativeImportDatabase::addToImport 0x106237370 "Qt" 4.7 Library as ""
-QDeclarativeImportDatabase::resolveType "Rectangle" = "QDeclarativeRectangle"
+QQmlImportDatabase::addImportPath "/qt-sdk/imports"
+QQmlImportDatabase::addImportPath "/qt-sdk/bin/QMLViewer.app/Contents/MacOS"
+QQmlImportDatabase::addToImport 0x106237370 "." -1.-1 File as ""
+QQmlImportDatabase::addToImport 0x106237370 "Qt" 4.7 Library as ""
+QQmlImportDatabase::resolveType "Rectangle" = "QDeclarativeRectangle"
\endcode
diff --git a/doc/src/qml/dynamicobjects.qdoc b/doc/src/qml/dynamicobjects.qdoc
index e3d9adb49a..c50f9dd337 100644
--- a/doc/src/qml/dynamicobjects.qdoc
+++ b/doc/src/qml/dynamicobjects.qdoc
@@ -80,31 +80,31 @@ the component. This function can take one or two arguments:
Here is an example. First there is \c Sprite.qml, which defines a simple QML component:
-\snippet doc/src/snippets/declarative/Sprite.qml 0
+\snippet doc/src/snippets/qml/Sprite.qml 0
Our main application file, \c main.qml, imports a \c componentCreation.js JavaScript file
that will create \c Sprite objects:
-\snippet doc/src/snippets/declarative/createComponent.qml 0
+\snippet doc/src/snippets/qml/createComponent.qml 0
Here is \c componentCreation.js. Notice it checks whether the component \l{Component::status}{status} is
\c Component.Ready before calling \l {Component::createObject()}{createObject()}
in case the QML file is loaded over a network and thus is not ready immediately.
-\snippet doc/src/snippets/declarative/componentCreation.js vars
+\snippet doc/src/snippets/qml/componentCreation.js vars
\codeline
-\snippet doc/src/snippets/declarative/componentCreation.js func
-\snippet doc/src/snippets/declarative/componentCreation.js remote
-\snippet doc/src/snippets/declarative/componentCreation.js func-end
+\snippet doc/src/snippets/qml/componentCreation.js func
+\snippet doc/src/snippets/qml/componentCreation.js remote
+\snippet doc/src/snippets/qml/componentCreation.js func-end
\codeline
-\snippet doc/src/snippets/declarative/componentCreation.js finishCreation
+\snippet doc/src/snippets/qml/componentCreation.js finishCreation
If you are certain the QML file to be loaded is a local file, you could omit the \c finishCreation()
function and call \l {Component::createObject()}{createObject()} immediately:
-\snippet doc/src/snippets/declarative/componentCreation.js func
-\snippet doc/src/snippets/declarative/componentCreation.js local
-\snippet doc/src/snippets/declarative/componentCreation.js func-end
+\snippet doc/src/snippets/qml/componentCreation.js func
+\snippet doc/src/snippets/qml/componentCreation.js local
+\snippet doc/src/snippets/qml/componentCreation.js func-end
Notice in both instances, \l {Component::createObject()}{createObject()} is called with
\c appWindow passed as an argument so that the created object will become a child of the
@@ -124,7 +124,7 @@ use the signal \c connect() method. See
If the QML is not defined until runtime, you can create a QML item from
a string of QML using the \l{QML:Qt::createQmlObject()}{Qt.createQmlObject()} function, as in the following example:
-\snippet doc/src/snippets/declarative/createQmlObject.qml 0
+\snippet doc/src/snippets/qml/createQmlObject.qml 0
The first argument is the string of QML to create. Just like in a new file, you will need to
import any types you wish to use. The second argument is the parent item for the new item;
@@ -145,7 +145,7 @@ The actual creation context depends on how an item is created:
\list
\o If \l {QML:Qt::createComponent()}{Qt.createComponent()} is used, the creation context
- is the QDeclarativeContext in which this method is called
+ is the QQmlContext in which this method is called
\o If \l{QML:Qt::createQmlObject()}{Qt.createQmlObject()}
if called, the creation context is the context of the parent item passed to this method
\o If a \c {Component{}} item is defined and \l {Component::createObject()}{createObject()}
@@ -181,8 +181,8 @@ component. Each instance runs a NumberAnimation, and when the animation has fini
\o \c SelfDestroyingRect.qml
\row
-\o \snippet doc/src/snippets/declarative/dynamicObjects-destroy.qml 0
-\o \snippet doc/src/snippets/declarative/SelfDestroyingRect.qml 0
+\o \snippet doc/src/snippets/qml/dynamicObjects-destroy.qml 0
+\o \snippet doc/src/snippets/qml/SelfDestroyingRect.qml 0
\endtable
@@ -209,6 +209,6 @@ destroyed if they were dynamically created.
Objects created with \l{QML:Qt::createQmlObject()}{Qt.createQmlObject()}
can similarly be destroyed using \c destroy():
-\snippet doc/src/snippets/declarative/createQmlObject.qml 0
-\snippet doc/src/snippets/declarative/createQmlObject.qml destroy
+\snippet doc/src/snippets/qml/createQmlObject.qml 0
+\snippet doc/src/snippets/qml/createQmlObject.qml destroy
*/
diff --git a/doc/src/qml/extending-tutorial.qdoc b/doc/src/qml/extending-tutorial.qdoc
index 00f4bb5691..b995c32cca 100644
--- a/doc/src/qml/extending-tutorial.qdoc
+++ b/doc/src/qml/extending-tutorial.qdoc
@@ -100,14 +100,14 @@ Here is our \c PieChart class, defined in \c piechart.h:
\snippet declarative/tutorials/extending/chapter1-basics/piechart.h 0
-The class inherits from QDeclarativeItem because we want to override
-QDeclarativeItem::paint() in order to draw. If the class just represented some
+The class inherits from QQuickItem because we want to override
+QQuickItem::paint() in order to draw. If the class just represented some
data type and was not an item that actually needed to be displayed, it could simply inherit
from QObject. Or, if we want to extend the functionality of an existing QObject-based
class, it could inherit from that class instead.
The \c PieChart class defines the two properties, \c name and \c color, with the Q_PROPERTY macro,
-and overrides QDeclarativeItem::paint(). The class implementation in \c piechart.cpp
+and overrides QQuickItem::paint(). The class implementation in \c piechart.cpp
simply sets and returns the \c m_name and \c m_color values as appropriate, and
implements \c paint() to draw a simple pie chart. It also turns off the
QGraphicsItem::ItemHasNoContents flag to enable painting:
@@ -127,7 +127,7 @@ converted to a QColor object for the PieChart \c color property. Automatic conve
provided for various other \l {QML Basic Types}{basic types}; for example, a string
like "640x480" can be automatically converted to a QSize value.
-We'll also create a C++ application that uses a QDeclarativeView to run and
+We'll also create a C++ application that uses a QQuickView to run and
display \c app.qml. The application must register the \c PieChart type
using the qmlRegisterType() function, to allow it to be used from QML. If
you don't register the type, \c app.qml won't be able to create a \c PieChart.
@@ -265,7 +265,7 @@ int-type property to store an identifier for each chart:
\code
// C++
- class PieChart : public QDeclarativeItem
+ class PieChart : public QQuickItem
{
Q_PROPERTY(int chartId READ chartId WRITE setChartId NOTIFY chartIdChanged)
...
@@ -306,7 +306,7 @@ we assign an \c PieSlice value which itself contains a \c color:
\snippet declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml 0
-Like \c PieChart, this new \c PieSlice type inherits from QDeclarativeItem and declares
+Like \c PieChart, this new \c PieSlice type inherits from QQuickItem and declares
its properties with Q_PROPERTY():
\snippet declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.h 0
@@ -324,7 +324,7 @@ and associated method signatures:
There is one thing to be aware of when implementing \c setPieSlice(). The \c PieSlice
is a visual item, so it must be set as a child of the \c PieChart using
-QDeclarativeItem::setParentItem() so that the \c PieChart knows to paint this child
+QQuickItem::setParentItem() so that the \c PieChart knows to paint this child
item when its contents are drawn:
\snippet declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp 0
@@ -359,7 +359,7 @@ have a \c slices property that accepts a list of \c PieSlice items:
\image extending-tutorial-chapter5.png
To do this, we replace the \c pieSlice property in \c PieChart with a \c slices property,
-declared as a QDeclarativeListProperty type. The QDeclarativeListProperty class enables the
+declared as a QQmlListProperty type. The QQmlListProperty class enables the
creation of list properties in QML extensions. We replace the \c pieSlice()
function with a \c slices() function that returns a list of slices, and add
an internal \c append_slice() function (discussed below). We also use a QList to
@@ -372,9 +372,9 @@ store the internal list of slices as \c m_slices:
\snippet declarative/tutorials/extending/chapter5-listproperties/piechart.h 2
Although the \c slices property does not have an associated \c WRITE function,
-it is still modifiable because of the way QDeclarativeListProperty works.
+it is still modifiable because of the way QQmlListProperty works.
In the \c PieChart implementation, we implement \c PieChart::slices() to
-return a QDeclarativeListProperty value and indicate that the internal
+return a QQmlListProperty value and indicate that the internal
\c PieChart::append_slice() function is to be called whenever a request is made from QML
to add items to the list:
@@ -382,7 +382,7 @@ to add items to the list:
The \c append_slice() function simply sets the parent item as before,
and adds the new item to the \c m_slices list. As you can see, the append function for a
-QDeclarativeListProperty is called with two arguments: the list property, and
+QQmlListProperty is called with two arguments: the list property, and
the item that is to be appended.
The \c PieSlice class has also been modified to include \c fromAngle and \c angleSpan
@@ -400,7 +400,7 @@ The complete code can be seen in the updated \c examples/tutorials/extending/cha
\example declarative/tutorials/extending/chapter6-plugins
Currently the \c PieChart and \c PieSlice types are used by \c app.qml,
-which is displayed using a QDeclarativeView in a C++ application. An alternative
+which is displayed using a QQuickView in a C++ application. An alternative
way to use our QML extension is to create a plugin library to make it available
to the QML engine. This allows \c app.qml to be loaded with the \l {QML Viewer}
(or some other QML \l{Qt Declarative UI Runtime}{runtime} application) instead of writing a \c main.cpp file and
@@ -414,8 +414,8 @@ To create a plugin library, we need:
\o A \l{Writing a qmldir file}{qmldir} file that tells the QML engine to load the plugin
\endlist
-First, we create a plugin class named \c ChartsPlugin. It subclasses QDeclarativeExtensionPlugin
-and registers our QML types in the inherited \l{QDeclarativeExtensionPlugin::}{registerTypes()} method. It also calls
+First, we create a plugin class named \c ChartsPlugin. It subclasses QQmlExtensionPlugin
+and registers our QML types in the inherited \l{QQmlExtensionPlugin::}{registerTypes()} method. It also calls
Q_EXPORT_PLUGIN2 for Qt's \l{How to Create Qt Plugins}{plugin system}.
Here is the \c ChartsPlugin definition in \c chartsplugin.h:
@@ -464,7 +464,7 @@ In this tutorial, we've shown the basic steps for creating a QML extension:
\o Add callable methods using Q_INVOKABLE or Qt slots, and connect to Qt signals with an \c onSignal syntax
\o Add property bindings by defining \l{Qt's Property System}{NOTIFY} signals
\o Define custom property types if the built-in types are not sufficient
-\o Define list property types using QDeclarativeListProperty
+\o Define list property types using QQmlListProperty
\o Create a plugin library by defining a Qt plugin and writing a \c qmldir file
\endlist
diff --git a/doc/src/qml/integrating.qdoc b/doc/src/qml/integrating.qdoc
index 7cd15a4fd4..2a88246006 100644
--- a/doc/src/qml/integrating.qdoc
+++ b/doc/src/qml/integrating.qdoc
@@ -38,13 +38,13 @@ depending on the characteristics of your existing UI code.
\section1 Integrating with a \l{QWidget}-based UI
If you have an existing QWidget-based UI, QML widgets can be integrated into
-it using QDeclarativeView. QDeclarativeView is a subclass of QWidget so you
+it using QQuickView. QQuickView is a subclass of QWidget so you
can add it to your user interface like any other QWidget. Use
-QDeclarativeView::setSource() to load a QML file into the view, then add the
+QQuickView::setSource() to load a QML file into the view, then add the
view to your UI:
\code
-QDeclarativeView *qmlView = new QDeclarativeView;
+QQuickView *qmlView = new QQuickView;
qmlView->setSource(QUrl::fromLocalFile("myqml.qml"));
QWidget *widget = myExistingWidget();
@@ -52,11 +52,11 @@ QVBoxLayout *layout = new QVBoxLayout(widget);
layout->addWidget(qmlView);
\endcode
-The one drawback to this approach is that QDeclarativeView is slower to initialize
-and uses more memory than a QWidget, and creating large numbers of QDeclarativeView
+The one drawback to this approach is that QQuickView is slower to initialize
+and uses more memory than a QWidget, and creating large numbers of QQuickView
objects may lead to performance degradation. If this is the case, it may be
better to rewrite your widgets in QML, and load the widgets from a main QML widget
-instead of using QDeclarativeView.
+instead of using QQuickView.
Keep in mind that QWidgets were designed for a different type of user interface
than QML, so it is not always a good idea to port a QWidget-based application to
@@ -71,7 +71,7 @@ of simple and dynamic elements.
If you have an existing UI based on the \l{Graphics View Framework},
you can integrate QML widgets directly into your QGraphicsScene. Use
-QDeclarativeComponent to create a QGraphicsObject from a QML file, and
+QQmlComponent to create a QGraphicsObject from a QML file, and
place the graphics object into your scene using \l{QGraphicsScene::addItem()}, or
reparent it to an item already in the \l{QGraphicsScene}.
@@ -79,8 +79,8 @@ For example:
\code
QGraphicsScene* scene = myExistingGraphicsScene();
-QDeclarativeEngine *engine = new QDeclarativeEngine;
-QDeclarativeComponent component(engine, QUrl::fromLocalFile("myqml.qml"));
+QQmlEngine *engine = new QQmlEngine;
+QQmlComponent component(engine, QUrl::fromLocalFile("myqml.qml"));
QGraphicsObject *object =
qobject_cast<QGraphicsObject *>(component.create());
scene->addItem(object);
diff --git a/doc/src/qml/javascriptblocks.qdoc b/doc/src/qml/javascriptblocks.qdoc
index 4cc98f1d7a..0c1d4c284c 100644
--- a/doc/src/qml/javascriptblocks.qdoc
+++ b/doc/src/qml/javascriptblocks.qdoc
@@ -200,8 +200,8 @@ in \c script.js:
\table
\row
-\o \snippet doc/src/snippets/declarative/integrating-javascript/connectjs.qml 0
-\o \snippet doc/src/snippets/declarative/integrating-javascript/script.js 0
+\o \snippet doc/src/snippets/qml/integrating-javascript/connectjs.qml 0
+\o \snippet doc/src/snippets/qml/integrating-javascript/script.js 0
\endtable
The \c jsFunction() will now be called whenever MouseArea's \c clicked signal is emitted.
@@ -222,7 +222,7 @@ Both relative and absolute JavaScript URLs can be imported. In the case of a
relative URL, the location is resolved relative to the location of the
\l {QML Document} that contains the import. If the script file is not accessible,
an error will occur. If the JavaScript needs to be fetched from a network
-resource, the component's \l {QDeclarativeComponent::status()}{status} is set to
+resource, the component's \l {QQmlComponent::status()}{status} is set to
"Loading" until the script has been downloaded.
Imported JavaScript files are always qualified using the "as" keyword. The
@@ -243,10 +243,10 @@ which in turn can call \c factorial() in \c factorial.js, as it has included
\table
\row
-\o {1,2} \snippet doc/src/snippets/declarative/integrating-javascript/includejs/app.qml 0
-\o \snippet doc/src/snippets/declarative/integrating-javascript/includejs/script.js 0
+\o {1,2} \snippet doc/src/snippets/qml/integrating-javascript/includejs/app.qml 0
+\o \snippet doc/src/snippets/qml/integrating-javascript/includejs/script.js 0
\row
-\o \snippet doc/src/snippets/declarative/integrating-javascript/includejs/factorial.js 0
+\o \snippet doc/src/snippets/qml/integrating-javascript/includejs/factorial.js 0
\endtable
Notice that calling \l {QML:Qt::include()}{Qt.include()} imports all functions from
@@ -479,11 +479,11 @@ themselves.
For the following examples, imagine that we have defined the following class:
-\snippet doc/src/snippets/declarative/integrating-javascript/scarceresources/avatarExample.h 0
+\snippet doc/src/snippets/qml/integrating-javascript/scarceresources/avatarExample.h 0
and that we have registered it with the QML type-system as follows:
-\snippet doc/src/snippets/declarative/integrating-javascript/scarceresources/avatarExample.cpp 0
+\snippet doc/src/snippets/qml/integrating-javascript/scarceresources/avatarExample.cpp 0
The AvatarExample class has a property which is a pixmap. When the property
is accessed in JavaScript scope, a copy of the resource will be created and
@@ -498,9 +498,9 @@ unless the client explicitly preserves it.
In the following example, the scarce resource will be automatically released
after the binding evaluation is complete.
-\snippet doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleOne.qml 0
+\snippet doc/src/snippets/qml/integrating-javascript/scarceresources/exampleOne.qml 0
-\snippet doc/src/snippets/declarative/integrating-javascript/scarceresources/avatarExample.cpp 1
+\snippet doc/src/snippets/qml/integrating-javascript/scarceresources/avatarExample.cpp 1
\section2 Example Two: Automatic Release Prevented By Reference
@@ -509,9 +509,9 @@ released after the binding expression evaluation is
complete, because there is a property var referencing the
scarce resource.
-\snippet doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleTwo.qml 0
+\snippet doc/src/snippets/qml/integrating-javascript/scarceresources/exampleTwo.qml 0
-\snippet doc/src/snippets/declarative/integrating-javascript/scarceresources/avatarExample.cpp 2
+\snippet doc/src/snippets/qml/integrating-javascript/scarceresources/avatarExample.cpp 2
\section2 Example Three: Explicit Preservation
@@ -519,11 +519,11 @@ In this example, the resource must be explicitly preserved in order
to prevent the declarative engine from automatically releasing the
resource after evaluation of the imported script.
-\snippet doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleThree.js 0
+\snippet doc/src/snippets/qml/integrating-javascript/scarceresources/exampleThree.js 0
-\snippet doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleThree.qml 0
+\snippet doc/src/snippets/qml/integrating-javascript/scarceresources/exampleThree.qml 0
-\snippet doc/src/snippets/declarative/integrating-javascript/scarceresources/avatarExample.cpp 3
+\snippet doc/src/snippets/qml/integrating-javascript/scarceresources/avatarExample.cpp 3
\section2 Example Four: Explicit Destruction
@@ -532,11 +532,11 @@ scarce resource variant. This example shows how a client may free system
resources by releasing the scarce resource held in a JavaScript object, if
required, during evaluation of a JavaScript expression.
-\snippet doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleFour.js 0
+\snippet doc/src/snippets/qml/integrating-javascript/scarceresources/exampleFour.js 0
-\snippet doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleFour.qml 0
+\snippet doc/src/snippets/qml/integrating-javascript/scarceresources/exampleFour.qml 0
-\snippet doc/src/snippets/declarative/integrating-javascript/scarceresources/avatarExample.cpp 4
+\snippet doc/src/snippets/qml/integrating-javascript/scarceresources/avatarExample.cpp 4
\section2 Example Five: Explicit Destruction And JavaScript References
@@ -546,8 +546,8 @@ to one scarce resource is held, and the client calls destroy() on one
of those references (to explicitly release the scarce resource), all of
the references will be affected.
-\snippet doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleFive.qml 0
+\snippet doc/src/snippets/qml/integrating-javascript/scarceresources/exampleFive.qml 0
-\snippet doc/src/snippets/declarative/integrating-javascript/scarceresources/avatarExample.cpp 5
+\snippet doc/src/snippets/qml/integrating-javascript/scarceresources/avatarExample.cpp 5
*/
diff --git a/doc/src/qml/modules.qdoc b/doc/src/qml/modules.qdoc
index f75c03301c..27f8ae8fb1 100644
--- a/doc/src/qml/modules.qdoc
+++ b/doc/src/qml/modules.qdoc
@@ -45,14 +45,14 @@ example, an \c import statement is required to use:
\list
\o A component defined in another QML file that is not in the same directory
\o A component defined in a QML file located on a remote server
-\o A \l{QDeclarativeExtensionPlugin}{QML extension plugin} library (unless the plugin is installed in the same directory)
+\o A \l{QQmlExtensionPlugin}{QML extension plugin} library (unless the plugin is installed in the same directory)
\o A JavaScript file (note this must be imported using \l {#namespaces}{named imports})
\endlist
An \c import statement includes the module name, and possibly a version number.
This can be seen in the snippet commonly found at the top of QML files:
-\snippet doc/src/snippets/declarative/imports/qtquick-1.0.qml import
+\snippet doc/src/snippets/qml/imports/qtquick-1.0.qml import
This imports version 1.0 of the "QtQuick" module into the global namespace. (The QML
library itself must be imported to use any of the \l {QML Elements}, as they
@@ -111,7 +111,7 @@ Window {
Similarly, if the directory resided on a network source, it could
be imported like this:
-\snippet doc/src/snippets/declarative/imports/network-imports.qml imports
+\snippet doc/src/snippets/qml/imports/network-imports.qml imports
A located module can also be imported as a network resource if it has a
\l{Writing a qmldir file}{qmldir file} in the directory that specifies the QML files
@@ -145,7 +145,7 @@ a later version was used, as the \c qmldir file specifies that these elements
are only available in the 1.0 version.
Note that modules imported as a network resource allow only access to components
-defined in QML files; components defined by C++ \l{QDeclarativeExtensionPlugin}{QML extension plugins}
+defined in QML files; components defined by C++ \l{QQmlExtensionPlugin}{QML extension plugins}
are not available.
@@ -153,7 +153,7 @@ are not available.
\section1 Installed Modules
Installed modules are modules that are made available through the QML import path,
-as defined by QDeclarativeEngine::importPathList(), or modules defined within
+as defined by QQmlEngine::importPathList(), or modules defined within
C++ application code. An installed module is referred to by a URI, which allows
the module to be imported from QML code without specifying a complete filesystem
path or network resource URL.
@@ -161,7 +161,7 @@ path or network resource URL.
When importing an installed module, an un-quoted URI is
used, with a mandatory version number:
-\snippet doc/src/snippets/declarative/imports/installed-module.qml imports
+\snippet doc/src/snippets/qml/imports/installed-module.qml imports
When a module is imported, the QML engine searches the QML import path for a matching
module. The root directory of the module must contain a
@@ -177,7 +177,7 @@ module could be located under \c com/nokia/qml/mymodule.2/qmldir or
\c com/nokia/qml/mymodule.2.1/qmldir. The engine will automatically load
the module which matches best.
-The import path, as returned by QDeclarativeEngine::importPathList(), defines the default
+The import path, as returned by QQmlEngine::importPathList(), defines the default
locations to be searched by the QML engine for a matching module. By default, this list
contains:
@@ -187,7 +187,7 @@ contains:
\o Paths specified by the \c QML_IMPORT_PATH environment variable
\endlist
-Additional import paths can be added through QDeclarativeEngine::addImportPath() or the
+Additional import paths can be added through QQmlEngine::addImportPath() or the
\c QML_IMPORT_PATH environment variable. When running the \l {QML Viewer}, you
can also use the \c -I option to add an import path.
@@ -227,7 +227,7 @@ as \c http://www.some-server.com/qml and this URL was added to the QML import pa
QML code would work just the same.
Note that modules imported as a network resource allow only access to components
-defined in QML files; components defined by C++ \l{QDeclarativeExtensionPlugin}{QML extension plugins}
+defined in QML files; components defined by C++ \l{QQmlExtensionPlugin}{QML extension plugins}
are not available.
@@ -244,10 +244,10 @@ qmlRegisterType<PieChart>("Charts", 1, 0, "PieChart");
This allows the application's QML files to use the \c PieChart type by importing the declared
\c Charts module:
-\snippet doc/src/snippets/declarative/imports/chart.qml import
+\snippet doc/src/snippets/qml/imports/chart.qml import
-For \l{QDeclarativeExtensionPlugin}{QML plugins}, the
-module URI is automatically passed to QDeclarativeExtensionPlugin::registerTypes(). This method
+For \l{QQmlExtensionPlugin}{QML plugins}, the
+module URI is automatically passed to QQmlExtensionPlugin::registerTypes(). This method
can be reimplemented by the developer to register the necessary types for the module. Below is the
\c registerTypes() implementation from the \l{declarative/cppextensions/plugins}{QML plugins}
example:
@@ -257,7 +257,7 @@ example:
Once the plugin is built and installed, and includes a \l{Writing a qmldir file}{qmldir file},
the module can be imported from QML, like this:
-\snippet doc/src/snippets/declarative/imports/timeexample.qml import
+\snippet doc/src/snippets/qml/imports/timeexample.qml import
Unlike QML types defined by QML files, a QML type defined in a C++ extension plugin cannot be loaded by
a module that is imported as a network resource.
@@ -271,15 +271,15 @@ By default, when a module is imported, its contents are imported into the global
To import a module into a specific namespace, use the \i as keyword:
-\snippet doc/src/snippets/declarative/imports/named-imports.qml imports
+\snippet doc/src/snippets/qml/imports/named-imports.qml imports
Types from these modules can then only be used when qualified by the namespace:
-\snippet doc/src/snippets/declarative/imports/named-imports.qml imported items
+\snippet doc/src/snippets/qml/imports/named-imports.qml imported items
Multiple modules can be imported into the same namespace in the same way that multiple modules can be imported into the global namespace:
-\snippet doc/src/snippets/declarative/imports/merged-named-imports.qml imports
+\snippet doc/src/snippets/qml/imports/merged-named-imports.qml imports
\section2 JavaScript Files
@@ -381,14 +381,14 @@ into a Namespace exported by the module. The contents of the script file are ma
available inside the namespace <Namespace>, which has the version number
<InitialVersion>.
-\bold {plugin <Name> [<Path>]} lines are used to add \l{QDeclarativeExtensionPlugin}{QML C++ plugins} to the module. <Name> is the name of the library. It is usually not the same as the file name
+\bold {plugin <Name> [<Path>]} lines are used to add \l{QQmlExtensionPlugin}{QML C++ plugins} to the module. <Name> is the name of the library. It is usually not the same as the file name
of the plugin binary, which is platform dependent; e.g. the library \c MyAppTypes would produce
\c libMyAppTypes.so on Linux and \c MyAppTypes.dll on Windows.
<Path> is an optional argument specifying either an absolute path to the directory containing the
plugin file, or a relative path from the directory containing the \c qmldir file to the directory
containing the plugin file. By default the engine searches for the plugin library in the directory that contains the \c qmldir
-file. The plugin search path can be queried with QDeclarativeEngine::pluginPathList() and modified using QDeclarativeEngine::addPluginPath(). When running the \l {QML Viewer}, use the \c -P option to add paths to the plugin search path.
+file. The plugin search path can be queried with QQmlEngine::pluginPathList() and modified using QQmlEngine::addPluginPath(). When running the \l {QML Viewer}, use the \c -P option to add paths to the plugin search path.
\bold {typeinfo <File>} lines add \l{Writing a qmltypes file}{type description files} to
the module that can be read by QML tools such as Qt Creator to get information about the
@@ -434,7 +434,7 @@ to \c /tmp/imports/My/Module/qmldir to register it.
While the qmldump tool covers most cases, it does not work if:
\list
-\o The plugin uses a \l{QDeclarativeCustomParser}. The component that uses
+\o The plugin uses a \l{QQmlCustomParser}. The component that uses
the custom parser will not get its members documented.
\o The plugin can not be loaded. In particular if you cross-compiled
the plugin for a different architecture, qmldump will not be able to
@@ -456,7 +456,7 @@ Module {
// The name is a unique identifier used to refer to this type.
// It is recommended you simply use the C++ type name.
- name: "QDeclarativeAbstractAnimation"
+ name: "QQuickAbstractAnimation"
// The name of the prototype Component.
prototype: "QObject"
@@ -492,12 +492,12 @@ Module {
Property {
name: "animations";
- type: "QDeclarativeAbstractAnimation"
+ type: "QQuickAbstractAnimation"
// defaults to false, whether this property is read only
isReadonly: true
// defaults to false, whether the type of this property was a pointer in C++
isPointer: true
- // defaults to false: whether the type actually is a QDeclarativeListProperty<type>
+ // defaults to false: whether the type actually is a QQmlListProperty<type>
isList: true
// defaults to 0: the meta object revision that introduced this property
revision: 1
diff --git a/doc/src/qml/network.qdoc b/doc/src/qml/network.qdoc
index 15a17203c3..71f42a4bfe 100644
--- a/doc/src/qml/network.qdoc
+++ b/doc/src/qml/network.qdoc
@@ -118,11 +118,11 @@ See the \tt examples/declarative/flickr for a real demonstration of this.
\section1 Configuring the Network Access Manager
-All network access from QML is managed by a QNetworkAccessManager set on the QDeclarativeEngine which executes the QML.
+All network access from QML is managed by a QNetworkAccessManager set on the QQmlEngine which executes the QML.
By default, this is an unmodified Qt QNetworkAccessManager. You may set a different manager by
-providing a QDeclarativeNetworkAccessManagerFactory and setting it via
-QDeclarativeEngine::setNetworkAccessManagerFactory().
-For example, the \l {QML Viewer} sets a QDeclarativeNetworkAccessManagerFactory which
+providing a QQmlNetworkAccessManagerFactory and setting it via
+QQmlEngine::setNetworkAccessManagerFactory().
+For example, the \l {QML Viewer} sets a QQmlNetworkAccessManagerFactory which
creates QNetworkAccessManager that trusts HTTP Expiry headers to avoid network cache checks,
allows HTTP Pipelining, adds a persistent HTTP CookieJar, a simple disk cache, and supports proxy settings.
@@ -134,7 +134,7 @@ the executable using \l{The Qt Resource System}. Using this, an executable can r
that is compiled into the executable:
\code
- QDeclarativeView *canvas = new QDeclarativeView;
+ QQuickView *canvas = new QQuickView;
canvas->setUrl(QUrl("qrc:/dial.qml"));
\endcode
diff --git a/doc/src/qml/propertybinding.qdoc b/doc/src/qml/propertybinding.qdoc
index b89b3d7a61..6dd862f55b 100644
--- a/doc/src/qml/propertybinding.qdoc
+++ b/doc/src/qml/propertybinding.qdoc
@@ -44,10 +44,10 @@ The syntax for properties is:
Elements already possess useful properties but, to create custom properties,
precede the property name with the keyword \c property.
-\snippet doc/src/snippets/declarative/properties.qml parent begin
-\snippet doc/src/snippets/declarative/properties.qml inherited properties
-\snippet doc/src/snippets/declarative/properties.qml custom properties
-\snippet doc/src/snippets/declarative/properties.qml parent end
+\snippet doc/src/snippets/qml/properties.qml parent begin
+\snippet doc/src/snippets/qml/properties.qml inherited properties
+\snippet doc/src/snippets/qml/properties.qml custom properties
+\snippet doc/src/snippets/qml/properties.qml parent end
QML property rules coincide with many of JavaScript's property rules, for example,
property names must begin with a lowercase letter.
@@ -62,14 +62,14 @@ to other property values or data accessible in the application. The property val
automatically kept up to date if the other properties or data values change.
Property bindings are created in QML using the colon "\c {:}" before the value:
-\snippet doc/src/snippets/declarative/properties.qml property binding
+\snippet doc/src/snippets/qml/properties.qml property binding
The property binding causes the width of the \c Rectangle to update whenever the
\c {parent}'s width changes.
QML extends a standards compliant JavaScript engine, so any valid JavaScript expression can be
used as a property binding. Bindings can access object properties, make function calls and even
use built-in JavaScript objects such as \c {Date} and \c {Math}.
-\snippet doc/src/snippets/declarative/properties.qml JavaScript sample
+\snippet doc/src/snippets/qml/properties.qml JavaScript sample
While syntactically bindings can be of arbitrary complexity, if a binding starts to become
overly complex - such as involving multiple lines, or imperative loops - it may be better
@@ -82,13 +82,13 @@ function.
When working with both QML and JavaScript, it is important to differentiate between
QML property binding and JavaScript value assignment. In QML, a property
binding is created using the colon "\c {:}".
-\snippet doc/src/snippets/declarative/properties.qml property binding
+\snippet doc/src/snippets/qml/properties.qml property binding
The property binding causes the width of the \c Rectangle to update whenever the
\c {parent}'s width changes.
Assigning a property value (using the equals sign "\c {=}") does not create a
property binding.
-\snippet doc/src/snippets/declarative/properties.qml property assignment
+\snippet doc/src/snippets/qml/properties.qml property assignment
Instead of creating a property binding, the assignment simply sets the \c Rectangle
\c width value to a number when the \c Component.onCompleted code is invoked.
@@ -186,7 +186,7 @@ Care must be taken when referring to the parent of an object property binding.
Elements and components that are bound to properties are not necessarily set
as children of the properties' component.
-\snippet doc/src/snippets/declarative/properties.qml object binding
+\snippet doc/src/snippets/qml/properties.qml object binding
The code snippet has a \l Gradient element that attempts to print its parent's
\c width value. However, the \c Gradient element is bound to the \c gradient
property, not the \c children property of the \c Rectangle. As a result, the
@@ -205,7 +205,7 @@ Certain objects provide additional properties by \i attaching properties to othe
objects. For example, the \l Keys element have properties that can \i attach to other QML
objects to provide keyboard handling.
-\snippet doc/src/snippets/declarative/properties.qml list attached property
+\snippet doc/src/snippets/qml/properties.qml list attached property
The element \l ListView provides the delegate, \c listdelegate, the property
\c isCurrentItem as an attached property. The \c ListView.isCurrentItem
\i{attached property} provides highlight information to the delegate.
@@ -221,7 +221,7 @@ to provide additional functionality to objects. Two prominent elements,
\l Component and \l Keys element provide
\l{QML Signal and Handler Event System}{signal handlers} as attached signal
handlers.
-\snippet doc/src/snippets/declarative/properties.qml attached signal handler
+\snippet doc/src/snippets/qml/properties.qml attached signal handler
Read the \l{QML Signal and Handler Event System} and the \l{Keyboard Focus in QML}
articles for more information.
@@ -232,14 +232,14 @@ Some properties may accept a binding to a list property, where more than one
component can bind to the property. List properties allow multiple
\l {State}{States}, \l {Gradient}{Gradients}, and other components to bind to a
single property.
-\snippet doc/src/snippets/declarative/properties.qml list property
+\snippet doc/src/snippets/qml/properties.qml list property
The list is enclosed in square brackets, with a comma separating the
list elements. In cases where you are only assigning a single item to a
list, you may omit the square brackets.
-\snippet doc/src/snippets/declarative/properties.qml single property
+\snippet doc/src/snippets/qml/properties.qml single property
To access the list, use the \c index property.
-\snippet doc/src/snippets/declarative/properties.qml print list property
+\snippet doc/src/snippets/qml/properties.qml print list property
The snippet code simply prints the name of the first state, \c FETCH.
See the \l{list}{list type} documentation
@@ -252,7 +252,7 @@ In some cases properties form a logical group and use either the \i dot notation
or \i group notation.
Grouped properties may be written both ways:
-\snippet doc/src/snippets/declarative/properties.qml grouped properties
+\snippet doc/src/snippets/qml/properties.qml grouped properties
In the element documentation grouped properties are shown using the dot notation.
@@ -275,18 +275,18 @@ Accessing the aliasing property is similar to accessing a regular property. In
addition, the optional \c default keyword indicates that the aliasing property
is a \l{Default Properties}{default property}.
-\snippet doc/src/snippets/declarative/Button.qml property alias
+\snippet doc/src/snippets/qml/Button.qml property alias
When importing the component as a \c Button, the \c buttonlabel is directly
accessible through the \c label property.
-\snippet doc/src/snippets/declarative/properties.qml alias usage
+\snippet doc/src/snippets/qml/properties.qml alias usage
In addition, the \c id property may also be aliased and referred outside the
component.
-\snippet doc/src/snippets/declarative/Button.qml parent begin
-\snippet doc/src/snippets/declarative/Button.qml id alias
-\snippet doc/src/snippets/declarative/Button.qml parent end
+\snippet doc/src/snippets/qml/Button.qml parent begin
+\snippet doc/src/snippets/qml/Button.qml id alias
+\snippet doc/src/snippets/qml/Button.qml parent end
The \c imagebutton component has the ability to modify the child \l Image object
and its properties.
-\snippet doc/src/snippets/declarative/properties.qml image alias
+\snippet doc/src/snippets/qml/properties.qml image alias
Using aliases, properties may be exposed to the
\l{qml-top-level-component}{top level component}. Exposing properties to the
@@ -299,7 +299,7 @@ Aliases are only activated once the component
when an uninitialized alias is referenced. Likewise, aliasing an aliasing
property will also result in an error.
-\snippet doc/src/snippets/declarative/properties.qml alias complete
+\snippet doc/src/snippets/qml/properties.qml alias complete
When importing the component, however, aliasing properties appear as regular Qt
properties and consequently can be used in alias references.
@@ -309,7 +309,7 @@ property, effectively overwriting the existing property. For example,
the following component has a \c color alias property, named the same as the built-in
\l {Rectangle::color} property:
-\snippet doc/src/snippets/declarative/properties.qml alias overwrite
+\snippet doc/src/snippets/qml/properties.qml alias overwrite
Any object that use this component and refer to its \c color property will be
referring to the alias rather than the ordinary \l {Rectangle::color} property.
@@ -328,13 +328,13 @@ as the \i {default property}. For example, the State element's default property
is its \l{State::changes}{changes} property. \l PropertyChanges elements
may simply be placed as the \c{State}'s children and they will be bound to the
\c changes property.
-\snippet doc/src/snippets/declarative/properties.qml state default
+\snippet doc/src/snippets/qml/properties.qml state default
Similarly, the \l Item element's default property is its
\l{Item::data}{data} property. The \c data property manages Item's
\c children and \c resources properties. This way, different data types may be
placed as direct children of the \c Item.
-\snippet doc/src/snippets/declarative/properties.qml default property
+\snippet doc/src/snippets/qml/properties.qml default property
Reassigning a default property is useful when a component is reused. For
example, the \l{declarative/ui-components/tabwidget}{TabWidget} example uses
@@ -350,14 +350,14 @@ For example, to bind a property exposed from the \l{The QML Engine}{declarative
runtime} or \l{QmlGlobalQtObject}{Qt object}, such as the \c system.brightness
property, to a value written in QML, you could use the \l Binding element as
follows:
-\snippet doc/src/snippets/declarative/properties.qml binding element
+\snippet doc/src/snippets/qml/properties.qml binding element
\section1 Changing Property Values in States
The \l PropertyChanges element is for setting property bindings within a
\l State element to set a property binding.
-\snippet doc/src/snippets/declarative/properties.qml PropertyChanges element
+\snippet doc/src/snippets/qml/properties.qml PropertyChanges element
The rectangle's \c color property will bind to the \c warning component's
\c color property when its \c state is set to the \c WARNING state.
*/
diff --git a/doc/src/qml/qmlcomponents.qdoc b/doc/src/qml/qmlcomponents.qdoc
index bcc465f4b2..21b94f2ae3 100644
--- a/doc/src/qml/qmlcomponents.qdoc
+++ b/doc/src/qml/qmlcomponents.qdoc
@@ -50,7 +50,7 @@ is the emphasis in QML.
Any snippet of QML code may become a component, by placing the code in a QML
file, whose file extension is \c .qml). A complete Button component that
responds to user input may be in a Button.qml file.
-\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml document
+\snippet doc/src/snippets/qml/reusablecomponents/Button.qml document
The component name, \c Button, matches the QML filename, \c Button.qml.
Also, the first character is in upper case. Matching the names allow
@@ -60,9 +60,9 @@ naming components with different filenames.
Alternatively, a \l Component element may encapsulate a QML object to form a
component.
-\snippet doc/src/snippets/declarative/reusablecomponents/component.qml parent begin
-\snippet doc/src/snippets/declarative/reusablecomponents/component.qml define inline component
-\snippet doc/src/snippets/declarative/reusablecomponents/component.qml parent end
+\snippet doc/src/snippets/qml/reusablecomponents/component.qml parent begin
+\snippet doc/src/snippets/qml/reusablecomponents/component.qml define inline component
+\snippet doc/src/snippets/qml/reusablecomponents/component.qml parent end
Components may incorporate any \l{Qt Quick}{QML feature} such as:
@@ -89,7 +89,7 @@ A component defined in a \c .qml file is directly usable by declaring the name
of the component. For example, a button defined in \c Button.qml is created by
declaring a \c Button. The button is defined in the
\l {qml-define-components}{Defining New Components} section.
-\snippet doc/src/snippets/declarative/reusablecomponents/application.qml document
+\snippet doc/src/snippets/qml/reusablecomponents/application.qml document
Note that the component name, \c Button, matches the QML filename, \c Button.qml.
Also, the first character is in upper case. Matching the names allow
@@ -100,7 +100,7 @@ For flexibility, a \c qmldir file is for dictating which additional components,
plugins, or directories should be imported. By using a \c qmldir file, component
names do not need to match the filenames. The \c qmldir file should, however, be
in an imported path.
-\snippet doc/src/snippets/declarative/reusablecomponents/qmldir document
+\snippet doc/src/snippets/qml/reusablecomponents/qmldir document
\section2 Loading an Inline Component
@@ -109,8 +109,8 @@ delayed. A component may be created during a MouseArea event or by using a
\l Loader element. The component can create an object, which is addressable in a
similar way as an \l {qml-id}{identifier}. Thus, the created object may
have its bindings set and read like a normal QML object.
-\snippet doc/src/snippets/declarative/reusablecomponents/component.qml define inline component
-\snippet doc/src/snippets/declarative/reusablecomponents/component.qml create inline component
+\snippet doc/src/snippets/qml/reusablecomponents/component.qml define inline component
+\snippet doc/src/snippets/qml/reusablecomponents/component.qml create inline component
\keyword qml-component-properties
\section1 Component Properties
@@ -140,11 +140,11 @@ Consider the Button component from the
object is a \l Rectangle. When imported, the Button component will possess the
Rectangle's properties, methods, signals, and any custom properties.
-\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml parent begin
-\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml ellipses
-\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml properties
-\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml ellipses
-\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml parent end
+\snippet doc/src/snippets/qml/reusablecomponents/Button.qml parent begin
+\snippet doc/src/snippets/qml/reusablecomponents/Button.qml ellipses
+\snippet doc/src/snippets/qml/reusablecomponents/Button.qml properties
+\snippet doc/src/snippets/qml/reusablecomponents/Button.qml ellipses
+\snippet doc/src/snippets/qml/reusablecomponents/Button.qml parent end
The Button's \c text alias is accessible from outside the component as well as
the Rectangle's visual properties and signals such as \c x, \c y, \c anchors,
@@ -156,7 +156,7 @@ children which is beneficial for certain types of interfaces. However, since
\c FocusScopes are not visual elements, the visual properties of its child need
to be exposed.
-\snippet doc/src/snippets/declarative/reusablecomponents/focusbutton.qml document
+\snippet doc/src/snippets/qml/reusablecomponents/focusbutton.qml document
\keyword qml-id
\section2 The Object Identifier
@@ -165,7 +165,7 @@ Each QML object may be given a special unique identifier called an \c id.
No other object within the same QML component (see \l{QML Documents}) can have
the same \c id value. QML objects may then access an object using the \c id
property.
-\snippet doc/src/snippets/declarative/properties.qml id property
+\snippet doc/src/snippets/qml/properties.qml id property
A component may readily access its parent's properties by using the \c parent
property.
@@ -178,15 +178,15 @@ Note that an \c id must begin with a lower-case letter or an underscore. The
Objects or Items declared within a component can be made accessible by binding their id to a
property alias.
-\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml parent begin
-\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml object alias
-\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml text
-\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml parent end
+\snippet doc/src/snippets/qml/reusablecomponents/Button.qml parent begin
+\snippet doc/src/snippets/qml/reusablecomponents/Button.qml object alias
+\snippet doc/src/snippets/qml/reusablecomponents/Button.qml text
+\snippet doc/src/snippets/qml/reusablecomponents/Button.qml parent end
The advantage of using an alias instead a property of type of the object is that the value of
the alias cannot be overridden, and members of the object can be used in property bindings when
declaring an instance of the component.
-\snippet doc/src/snippets/declarative/reusablecomponents/application.qml grouped property
+\snippet doc/src/snippets/qml/reusablecomponents/application.qml grouped property
If a property of type \c Text was used instead of an alias in this instance there would be no
guarantee that \c label would be initialized before the binding was attempted which would cause
the binding to fail.
diff --git a/doc/src/qml/qmldocument.qdoc b/doc/src/qml/qmldocument.qdoc
index fedeba35e1..426f135a45 100644
--- a/doc/src/qml/qmldocument.qdoc
+++ b/doc/src/qml/qmldocument.qdoc
@@ -36,7 +36,7 @@ from text data.
Here is a simple QML document:
-\snippet doc/src/snippets/declarative/qml-documents/non-trivial.qml document
+\snippet doc/src/snippets/qml/qml-documents/non-trivial.qml document
QML documents are always encoded in UTF-8 format.
@@ -79,7 +79,7 @@ text property:
\o application.qml
\row
-\o \snippet doc/src/snippets/declarative/qml-documents/qmldocuments.qml document
+\o \snippet doc/src/snippets/qml/qml-documents/qmldocuments.qml document
\o
\qml
import QtQuick 2.0
@@ -138,14 +138,14 @@ These final two examples perform identically to the original document.
\table
\row
\o
-\snippet doc/src/snippets/declarative/qml-documents/inline-component.qml document
+\snippet doc/src/snippets/qml/qml-documents/inline-component.qml document
\o
-\snippet doc/src/snippets/declarative/qml-documents/inline-text-component.qml document
+\snippet doc/src/snippets/qml/qml-documents/inline-text-component.qml document
\endtable
For information about components, the \l{QML Components} article details the
creation of components and how to load them in other components.
-\sa QDeclarativeComponent
+\sa QQmlComponent
*/
diff --git a/doc/src/qml/qmlengine.qdoc b/doc/src/qml/qmlengine.qdoc
index 3e8ef1ae3f..0865755c7b 100644
--- a/doc/src/qml/qmlengine.qdoc
+++ b/doc/src/qml/qmlengine.qdoc
@@ -38,16 +38,16 @@ specified in QML files, plugins, or applications.
\section1 Core Module Classes
- The \l{QtDeclarative}{Qt Declarative} module provides a set of C++ APIs for
+ The \l{QtQml}{Qt Declarative} module provides a set of C++ APIs for
extending your QML applications from C++ and embedding QML into C++
applications. There are several core classes in the Qt Declarative module
that provide the essential capabilities for doing this. These are:
\list
- \o QDeclarativeEngine: A QML engine provides the environment for executing QML code. Every
+ \o QQmlEngine: A QML engine provides the environment for executing QML code. Every
application requires at least one engine instance.
- \o QDeclarativeComponent: A component encapsulates QML information.
- \o QDeclarativeContext: A context allows an application to expose data to
+ \o QQmlComponent: A component encapsulates QML information.
+ \o QQmlContext: A context allows an application to expose data to
the QML components created by an engine.
\endlist
@@ -61,27 +61,27 @@ specified in QML files, plugins, or applications.
\endlist
\section2 Declarative Engine
- A QDeclarativeEngine allows the configuration of global settings that
+ A QQmlEngine allows the configuration of global settings that
apply to all of its QML component instances: for example, the
QNetworkAccessManager to be used for network communications, and the
file path to be used for persistent storage.
- QDeclarativeComponent is used to load QML documents. Each
- QDeclarativeComponent instance represents a single document. A component
+ QQmlComponent is used to load QML documents. Each
+ QQmlComponent instance represents a single document. A component
can be created from the URL or file path of a QML document, or the raw
QML code of the document. Component instances are instatiated through
- the QDeclarativeComponent::create() method, like this:
+ the QQmlComponent::create() method, like this:
\code
- QDeclarativeEngine engine;
- QDeclarativeComponent component(&engine, QUrl::fromLocalFile("MyRectangle.qml"));
+ QQmlEngine engine;
+ QQmlComponent component(&engine, QUrl::fromLocalFile("MyRectangle.qml"));
QObject *rectangleInstance = component.create();
// ...
delete rectangleInstance;
\endcode
- QML documents can also be loaded using QDeclarativeView. This class
+ QML documents can also be loaded using QQuickView. This class
provides a convenient QWidget-based view for embedding QML components
into QGraphicsView-based applications. (For other methods of integrating
QML into QWidget-based applications, see \l {Integrating QML Code with
@@ -91,44 +91,44 @@ specified in QML files, plugins, or applications.
\section2 Loading QML Components from C++
- A QML document can be loaded with QDeclarativeComponent or QDeclarativeView.
- QDeclarativeComponent loads a QML component as a C++ object;
- QDeclarativeView also does this, but additionally loads the QML component
+ A QML document can be loaded with QQmlComponent or QQuickView.
+ QQmlComponent loads a QML component as a C++ object;
+ QQuickView also does this, but additionally loads the QML component
directly into a QGraphicsView. It is convenient for loading a displayable
QML component into a QWidget-based application.
For example, suppose there is a \c MyItem.qml file that looks like this:
- \snippet doc/src/snippets/declarative/qtbinding/loading/MyItem.qml start
- \snippet doc/src/snippets/declarative/qtbinding/loading/MyItem.qml end
+ \snippet doc/src/snippets/qml/qtbinding/loading/MyItem.qml start
+ \snippet doc/src/snippets/qml/qtbinding/loading/MyItem.qml end
- This QML document can be loaded with QDeclarativeComponent or
- QDeclarativeView with the following C++ code. Using a QDeclarativeComponent
- requires calling QDeclarativeComponent::create() to create a new instance of
- the component, while a QDeclarativeView automatically creates an instance of
- the component, which is accessible via QDeclarativeView::rootObject():
+ This QML document can be loaded with QQmlComponent or
+ QQuickView with the following C++ code. Using a QQmlComponent
+ requires calling QQmlComponent::create() to create a new instance of
+ the component, while a QQuickView automatically creates an instance of
+ the component, which is accessible via QQuickView::rootObject():
\table
\row
\o
- \snippet doc/src/snippets/declarative/qtbinding/loading/main.cpp QDeclarativeComponent-a
+ \snippet doc/src/snippets/qml/qtbinding/loading/main.cpp QQmlComponent-a
\dots 0
- \snippet doc/src/snippets/declarative/qtbinding/loading/main.cpp QDeclarativeComponent-b
+ \snippet doc/src/snippets/qml/qtbinding/loading/main.cpp QQmlComponent-b
\o
- \snippet doc/src/snippets/declarative/qtbinding/loading/main.cpp QDeclarativeView
+ \snippet doc/src/snippets/qml/qtbinding/loading/main.cpp QQuickView
\endtable
This \c object is the instance of the \c MyItem.qml component that has been
created. You can now modify the item's properties using
- QObject::setProperty() or QDeclarativeProperty:
+ QObject::setProperty() or QQmlProperty:
- \snippet doc/src/snippets/declarative/qtbinding/loading/main.cpp properties
+ \snippet doc/src/snippets/qml/qtbinding/loading/main.cpp properties
Alternatively, you can cast the object to its actual type and call functions
with compile-time safety. In this case the base object of \c MyItem.qml is
- an \l Item, which is defined by the QDeclarativeItem class:
+ an \l Item, which is defined by the QQuickItem class:
- \snippet doc/src/snippets/declarative/qtbinding/loading/main.cpp cast
+ \snippet doc/src/snippets/qml/qtbinding/loading/main.cpp cast
You can also connect to any signals or call functions defined in the
component using QMetaObject::invokeMethod() and QObject::connect(). See \l
@@ -141,14 +141,14 @@ specified in QML files, plugins, or applications.
the QObject::objectName property with QObject::findChild(). For example, if
the root item in \c MyItem.qml had a child \l Rectangle item:
- \snippet doc/src/snippets/declarative/qtbinding/loading/MyItem.qml start
+ \snippet doc/src/snippets/qml/qtbinding/loading/MyItem.qml start
\codeline
- \snippet doc/src/snippets/declarative/qtbinding/loading/MyItem.qml child
- \snippet doc/src/snippets/declarative/qtbinding/loading/MyItem.qml end
+ \snippet doc/src/snippets/qml/qtbinding/loading/MyItem.qml child
+ \snippet doc/src/snippets/qml/qtbinding/loading/MyItem.qml end
The child could be located like this:
- \snippet doc/src/snippets/declarative/qtbinding/loading/main.cpp findChild
+ \snippet doc/src/snippets/qml/qtbinding/loading/main.cpp findChild
If \c objectName is used inside a delegate of a ListView, \l Repeater or
some other element that creates multiple instances of its delegates, there
@@ -172,20 +172,20 @@ specified in QML files, plugins, or applications.
\section2 Embedding C++ Objects into QML Components
When loading a QML scene into a C++ application, it can be useful to
- directly embed C++ data into the QML object. QDeclarativeContext enables
+ directly embed C++ data into the QML object. QQmlContext enables
this by exposing data to the context of a QML component, allowing data to be
injected from C++ into QML.
For example, here is a QML item that refers to a \c currentDateTime value
that does not exist in the current scope:
- \snippet doc/src/snippets/declarative/qtbinding/context/MyItem.qml 0
+ \snippet doc/src/snippets/qml/qtbinding/context/MyItem.qml 0
This \c currentDateTime value can be set directly by the C++ application
that loads the QML component, using
- QDeclarativeContext::setContextProperty():
+ QQmlContext::setContextProperty():
- \snippet doc/src/snippets/declarative/qtbinding/context/main.cpp 0
+ \snippet doc/src/snippets/qml/qtbinding/context/main.cpp 0
Context properties can hold either QVariant or QObject* values. This means
custom C++ objects can also be injected using this approach, and these
@@ -196,11 +196,11 @@ specified in QML files, plugins, or applications.
\table
\row
\o
- \snippet doc/src/snippets/declarative/qtbinding/context-advanced/applicationdata.h 0
+ \snippet doc/src/snippets/qml/qtbinding/context-advanced/applicationdata.h 0
\codeline
- \snippet doc/src/snippets/declarative/qtbinding/context-advanced/main.cpp 0
+ \snippet doc/src/snippets/qml/qtbinding/context-advanced/main.cpp 0
\o
- \snippet doc/src/snippets/declarative/qtbinding/context-advanced/MyItem.qml 0
+ \snippet doc/src/snippets/qml/qtbinding/context-advanced/MyItem.qml 0
\endtable
(Note that date/time values returned from C++ to QML can be formatted through
@@ -212,7 +212,7 @@ specified in QML files, plugins, or applications.
connected to using an \c onDataChanged handler within a \l Connections
object:
- \snippet doc/src/snippets/declarative/qtbinding/context-advanced/connections.qml 0
+ \snippet doc/src/snippets/qml/qtbinding/context-advanced/connections.qml 0
Context properties can be useful for using C++ based data models in a QML view. See the
\l {declarative/modelviews/stringlistmodel}{String ListModel},
@@ -221,7 +221,7 @@ specified in QML files, plugins, or applications.
respective examples on using QStringListModel, QObjectList-based models and QAbstractItemModel
in QML views.
- Also see the QDeclarativeContext documentation for more information.
+ Also see the QQmlContext documentation for more information.
\section1 Invoking QML Entities through the Engine
@@ -246,8 +246,8 @@ specified in QML files, plugins, or applications.
\table
\row
- \o \snippet doc/src/snippets/declarative/qtbinding/functions-qml/MyItem.qml 0
- \o \snippet doc/src/snippets/declarative/qtbinding/functions-qml/main.cpp 0
+ \o \snippet doc/src/snippets/qml/qtbinding/functions-qml/MyItem.qml 0
+ \o \snippet doc/src/snippets/qml/qtbinding/functions-qml/main.cpp 0
\endtable
Notice the Q_RETURN_ARG() and Q_ARG() arguments for
@@ -257,16 +257,16 @@ specified in QML files, plugins, or applications.
To call a C++ function from QML, the function must be either a Qt slot, or a
function marked with the Q_INVOKABLE macro, to be available to QML. In the
following example, the QML code invokes methods on the \c myObject object,
- which has been set using QDeclarativeContext::setContextProperty():
+ which has been set using QQmlContext::setContextProperty():
\table
\row
\o
- \snippet doc/src/snippets/declarative/qtbinding/functions-cpp/MyItem.qml 0
+ \snippet doc/src/snippets/qml/qtbinding/functions-cpp/MyItem.qml 0
\o
- \snippet doc/src/snippets/declarative/qtbinding/functions-cpp/myclass.h 0
+ \snippet doc/src/snippets/qml/qtbinding/functions-cpp/myclass.h 0
\codeline
- \snippet doc/src/snippets/declarative/qtbinding/functions-cpp/main.cpp 0
+ \snippet doc/src/snippets/qml/qtbinding/functions-cpp/main.cpp 0
\endtable
QML supports the calling of overloaded C++ functions. If there are multiple
@@ -289,11 +289,11 @@ specified in QML files, plugins, or applications.
\table
\row
\o
- \snippet doc/src/snippets/declarative/qtbinding/signals-qml/MyItem.qml 0
+ \snippet doc/src/snippets/qml/qtbinding/signals-qml/MyItem.qml 0
\o
- \snippet doc/src/snippets/declarative/qtbinding/signals-qml/myclass.h 0
+ \snippet doc/src/snippets/qml/qtbinding/signals-qml/myclass.h 0
\codeline
- \snippet doc/src/snippets/declarative/qtbinding/signals-qml/main.cpp 0
+ \snippet doc/src/snippets/qml/qtbinding/signals-qml/main.cpp 0
\endtable
To connect to Qt C++ signals from within QML, use a signal handler with the
@@ -308,12 +308,12 @@ specified in QML files, plugins, or applications.
\row
\o
- \snippet doc/src/snippets/declarative/qtbinding/signals-cpp/imageviewer.h start
+ \snippet doc/src/snippets/qml/qtbinding/signals-cpp/imageviewer.h start
\dots 4
- \snippet doc/src/snippets/declarative/qtbinding/signals-cpp/imageviewer.h end
+ \snippet doc/src/snippets/qml/qtbinding/signals-cpp/imageviewer.h end
\o
- \snippet doc/src/snippets/declarative/qtbinding/signals-cpp/standalone.qml 0
+ \snippet doc/src/snippets/qml/qtbinding/signals-cpp/standalone.qml 0
\endtable
(Note that if a signal has been declared as the NOTIFY signal for a
@@ -326,13 +326,13 @@ specified in QML files, plugins, or applications.
If, however, the object with the signal is not created from within the QML
code, and the QML item only has a reference to the created object - for
example, if the object was set using
- QDeclarativeContext::setContextProperty() - then the \l Connections element
+ QQmlContext::setContextProperty() - then the \l Connections element
can be used instead to create the signal handler:
\table
\row
- \o \snippet doc/src/snippets/declarative/qtbinding/signals-cpp/main.cpp connections
- \o \snippet doc/src/snippets/declarative/qtbinding/signals-cpp/MyItem.qml 0
+ \o \snippet doc/src/snippets/qml/qtbinding/signals-cpp/main.cpp connections
+ \o \snippet doc/src/snippets/qml/qtbinding/signals-cpp/MyItem.qml 0
\endtable
C++ signals can use enum values as parameters provided that the enum is
@@ -346,14 +346,14 @@ specified in QML files, plugins, or applications.
Any properties declared in a QML object are automatically accessible from
C++. Given a QML item like this:
- \snippet doc/src/snippets/declarative/qtbinding/properties-qml/MyItem.qml 0
+ \snippet doc/src/snippets/qml/qtbinding/properties-qml/MyItem.qml 0
The value of the \c someNumber property can be set and read using
- QDeclarativeProperty, or QObject::setProperty() and QObject::property():
+ QQmlProperty, or QObject::setProperty() and QObject::property():
- \snippet doc/src/snippets/declarative/qtbinding/properties-qml/main.cpp 0
+ \snippet doc/src/snippets/qml/qtbinding/properties-qml/main.cpp 0
- You should always use QObject::setProperty(), QDeclarativeProperty or
+ You should always use QObject::setProperty(), QQmlProperty or
QMetaProperty::write() to change a QML property value, to ensure the QML
engine is made aware of the property change. For example, say you have a
custom element \c PushButton with a \c buttonText property that internally
@@ -362,7 +362,7 @@ specified in QML files, plugins, or applications.
\badcode
// BAD!
- QDeclarativeComponent component(engine, "MyButton.qml");
+ QQmlComponent component(engine, "MyButton.qml");
PushButton *button = qobject_cast<PushButton*>(component.create());
button->m_buttonText = "Click me";
\endcode
@@ -381,8 +381,8 @@ specified in QML files, plugins, or applications.
\table
\row
- \o \snippet doc/src/snippets/declarative/qtbinding/properties-cpp/applicationdata.h 0
- \o \snippet doc/src/snippets/declarative/qtbinding/properties-cpp/MyItem.qml 0
+ \o \snippet doc/src/snippets/qml/qtbinding/properties-cpp/applicationdata.h 0
+ \o \snippet doc/src/snippets/qml/qtbinding/properties-cpp/MyItem.qml 0
\endtable
Notice the \c backgroundColorChanged signal is declared as the NOTIFY signal
@@ -401,7 +401,7 @@ specified in QML files, plugins, or applications.
Additional Qt code is runnable in the engine as a QML plugin. The \l{QML
Plugins} article covers the creation and usage patterns of QML plugins. The
- QDeclarativeExtensionPlugin class is an abstract class for writing QML
+ QQmlExtensionPlugin class is an abstract class for writing QML
plugins. The \l {How to Create Qt Plugins} contains more information about
Qt's plugin system.
@@ -413,17 +413,17 @@ specified in QML files, plugins, or applications.
initializing some costly data structures until after all the properties have
been set.
- The QML engine defines an interface class called QDeclarativeParserStatus,
+ The QML engine defines an interface class called QQmlParserStatus,
which contains a number of virtual methods that are invoked at various
stages during component instantiation. To receive these notifications, an
- element implementation inherits QDeclarativeParserStatus and notifies the Qt
+ element implementation inherits QQmlParserStatus and notifies the Qt
meta system using the Q_INTERFACES() macro.
\code
- class Example : public QObject, public QDeclarativeParserStatus
+ class Example : public QObject, public QQmlParserStatus
{
Q_OBJECT
- Q_INTERFACES(QDeclarativeParserStatus)
+ Q_INTERFACES(QQmlParserStatus)
public:
virtual void componentComplete()
{
diff --git a/doc/src/qml/qmlevents.qdoc b/doc/src/qml/qmlevents.qdoc
index f29b2f260b..1f2e7a9908 100644
--- a/doc/src/qml/qmlevents.qdoc
+++ b/doc/src/qml/qmlevents.qdoc
@@ -58,9 +58,9 @@ Attempting to declare two signals or methods with the same name in the same type
block generates an error. However, a new signal may reuse the name of an existing signal on the type. (This should be done with caution, as the existing signal may be hidden and become inaccessible.)
Here are various examples of signal declarations:
-\snippet doc/src/snippets/declarative/events.qml parent begin
-\snippet doc/src/snippets/declarative/events.qml signal declaration
-\snippet doc/src/snippets/declarative/events.qml parent end
+\snippet doc/src/snippets/qml/events.qml parent begin
+\snippet doc/src/snippets/qml/events.qml signal declaration
+\snippet doc/src/snippets/qml/events.qml parent end
If the signal has no parameters, the "\c{()}" brackets are optional. If
parameters are used, the parameter types must be declared, as for the \c string
@@ -69,17 +69,17 @@ and \c variant arguments of the \c perform signal.
Adding a signal to an item automatically adds a \i{signal handler} as well. The
signal hander is named \c on<SignalName>, with the first letter of the signal in
uppercase. The previous signals have the following signal handlers:
-\snippet doc/src/snippets/declarative/events.qml signal handler declaration
+\snippet doc/src/snippets/qml/events.qml signal handler declaration
Further, each QML properties have a \c{<property_name>Changed} signal and its
corresponding \c{on<property_name>Changed} signal handler. As a result, property
changes may notify other components for any changes.
-\snippet doc/src/snippets/declarative/events.qml automatic signals
+\snippet doc/src/snippets/qml/events.qml automatic signals
To emit a signal, invoke it as a method. The signal handler binding is similar
to a property binding and it is invoked when the signal is emitted. Use the
defined argument names to access the respective arguments.
-\snippet doc/src/snippets/declarative/events.qml signal emit
+\snippet doc/src/snippets/qml/events.qml signal emit
Note that the \c Component.onCompleted is an
\l{attached-signalhandlers}{attached signal handler}; it is invoked when the
\l Component initialization is complete.
@@ -93,7 +93,7 @@ automatically invoked whenever the signal is emitted. This mechanism enables a
signal to be received by a method instead of a
\l {Signal Handlers}{signal handler}.
-\snippet doc/src/snippets/declarative/events.qml connect method
+\snippet doc/src/snippets/qml/events.qml connect method
The \c {connect()} method is appropriate when connecting a JavaScript method to
a signal.
@@ -104,7 +104,7 @@ signals.
By connecting signals to other signals, the \c connect() method can form different
signal chains.
-\snippet doc/src/snippets/declarative/events.qml forward signal
+\snippet doc/src/snippets/qml/events.qml forward signal
Whenever the \l MouseArea \c clicked signal is emitted, the \c send
diff --git a/doc/src/qml/qmlintro.qdoc b/doc/src/qml/qmlintro.qdoc
index 03ee94d6d1..3290a27bc3 100644
--- a/doc/src/qml/qmlintro.qdoc
+++ b/doc/src/qml/qmlintro.qdoc
@@ -1197,7 +1197,7 @@ arrange a set of Rectangle items. The Repeater item creates a series of 24
rectangles for the Grid item to position in a 5 by 5 arrangement.
\clearfloat
-\snippet doc/src/snippets/declarative/repeaters/repeater-grid-index.qml document
+\snippet doc/src/snippets/qml/repeaters/repeater-grid-index.qml document
The number of items created by a Repeater is held by its \l{Repeater::}{count}
property. It is not possible to set this property to determine the number of
diff --git a/doc/src/qml/qmlplugins.qdoc b/doc/src/qml/qmlplugins.qdoc
index 9b6fe29c1e..e41bba2906 100644
--- a/doc/src/qml/qmlplugins.qdoc
+++ b/doc/src/qml/qmlplugins.qdoc
@@ -36,16 +36,16 @@
C++ code as plugins. Plugins are imported and labeled as modules and
its content are available as components.
- QDeclarativeExtensionPlugin is a plugin interface that makes it possible to
+ QQmlExtensionPlugin is a plugin interface that makes it possible to
create QML extensions that can be loaded dynamically into QML applications.
These extensions allow custom QML types to be made available to the
QML engine.
To write a QML extension plugin:
\list 1
- \o Subclass QDeclarativeExtensionPlugin
- \o Implement QDeclarativeExtensionPlugin's
- \l{QDeclarativeExtensionPlugin::}{registerTypes()} method
+ \o Subclass QQmlExtensionPlugin
+ \o Implement QQmlExtensionPlugin's
+ \l{QQmlExtensionPlugin::}{registerTypes()} method
\o Register types with qmlRegisterType()
\o Export the class using the Q_EXPORT_PLUGIN2() macro
\o Write a project file for the plugin
@@ -67,8 +67,8 @@
\dots
A plugin class, \c QExampleQMLPlugin, is a subclass of
- \l QDeclarativeExtensionPlugin and it implements the
- \l{QDeclarativeExtensionPlugin::}{registerTypes()} method.
+ \l QQmlExtensionPlugin and it implements the
+ \l{QQmlExtensionPlugin::}{registerTypes()} method.
In the registerTypes() method, the plugin class can
\l{register-c++-type}{register} the \c TimeModel class to the declarative
diff --git a/doc/src/qml/qmlruntime.qdoc b/doc/src/qml/qmlruntime.qdoc
index 5853c14844..a803fabd7a 100644
--- a/doc/src/qml/qmlruntime.qdoc
+++ b/doc/src/qml/qmlruntime.qdoc
@@ -35,8 +35,8 @@ Declarative UI engine along with the built-in QML elements and plugin modules,
and it also provides access to third-party QML elements and modules.
Applications that use QML need to invoke the QML runtime in order to
-execute QML documents. This can be done by creating a QDeclarativeView
-or a QDeclarativeEngine, as described below. In addition, the Declarative UI
+execute QML documents. This can be done by creating a QQuickView
+or a QQmlEngine, as described below. In addition, the Declarative UI
package includes the \QQV tool, which loads \c .qml files. This tool is
useful for developing and testing QML code without the need to write
a C++ application to load the QML runtime.
@@ -47,17 +47,17 @@ a C++ application to load the QML runtime.
To deploy an application that uses QML, the QML runtime must be invoked by
the application. This is done by writing a Qt C++ application that loads the
-QDeclarativeEngine by either:
+QQmlEngine by either:
\list
-\o Loading the QML file through a QDeclarativeView instance, or
-\o Creating a QDeclarativeEngine instance and loading QML files with QDeclarativeComponent
+\o Loading the QML file through a QQuickView instance, or
+\o Creating a QQmlEngine instance and loading QML files with QQmlComponent
\endlist
-\section2 Deploying with QDeclarativeView
+\section2 Deploying with QQuickView
-QDeclarativeView is a QWidget-based class that is able to load QML files.
+QQuickView is a QWidget-based class that is able to load QML files.
For example, if there is a QML file, \c application.qml, like this:
\qml
@@ -70,13 +70,13 @@ It can be loaded in a Qt application's \c main.cpp file like this:
\code
#include <QApplication>
- #include <QDeclarativeView>
+ #include <QQuickView>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- QDeclarativeView view;
+ QQuickView view;
view.setSource(QUrl::fromLocalFile("application.qml"));
view.show();
@@ -97,27 +97,27 @@ the \c declarative module for the \c QT variable. For example:
\endcode
-\section2 Creating a QDeclarativeEngine directly
+\section2 Creating a QQmlEngine directly
If \c application.qml does not have any graphical components, or if it is
-preferred to avoid QDeclarativeView for other reasons, the QDeclarativeEngine
+preferred to avoid QQuickView for other reasons, the QQmlEngine
can be constructed directly instead. In this case, \c application.qml is
-loaded as a QDeclarativeComponent instance rather than placed into a view:
+loaded as a QQmlComponent instance rather than placed into a view:
\code
#include <QApplication>
- #include <QDeclarativeEngine>
- #include <QDeclarativeContext>
- #include <QDeclarativeComponent>
+ #include <QQmlEngine>
+ #include <QQmlContext>
+ #include <QQmlComponent>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- QDeclarativeEngine engine;
- QDeclarativeContext *objectContext = new QDeclarativeContext(engine.rootContext());
+ QQmlEngine engine;
+ QQmlContext *objectContext = new QQmlContext(engine.rootContext());
- QDeclarativeComponent component(&engine, "application.qml");
+ QQmlComponent component(&engine, "application.qml");
QObject *object = component.create(objectContext);
// ... delete object and objectContext when necessary
@@ -127,7 +127,7 @@ loaded as a QDeclarativeComponent instance rather than placed into a view:
\endcode
See \l {Using QML Bindings in C++ Applications} for more information about using
-QDeclarativeEngine, QDeclarativeContext and QDeclarativeComponent, as well
+QQmlEngine, QQmlContext and QQmlComponent, as well
as details on including QML files through \l{The Qt Resource System}{Qt's Resource system}.
diff --git a/doc/src/qml/qmlsyntax.qdoc b/doc/src/qml/qmlsyntax.qdoc
index b2b7fc89bd..1cd6ad7f46 100644
--- a/doc/src/qml/qmlsyntax.qdoc
+++ b/doc/src/qml/qmlsyntax.qdoc
@@ -133,7 +133,7 @@ Commenting in QML is similar to JavaScript.
\o Multiline comments start with /* and finish with *\/
\endlist
-\snippet doc/src/snippets/declarative/comments.qml 0
+\snippet doc/src/snippets/qml/comments.qml 0
Comments are ignored by the engine. They are useful for explaining what you
are doing; for referring back to at a later date, or for others reading
diff --git a/doc/src/qml/qmltypes.qdoc b/doc/src/qml/qmltypes.qdoc
index 964ff98a15..9555e54f7e 100644
--- a/doc/src/qml/qmltypes.qdoc
+++ b/doc/src/qml/qmltypes.qdoc
@@ -350,7 +350,7 @@ Q_PROPERTY(int size READ size CONSTANT)
Properties that are lists of objects or Qt interfaces are also declared with
the Q_PROPERTY() macro. However, list properties must have the type
- \l{QDeclarativeListProperty}{QDeclarativeListProperty<T>}.
+ \l{QQmlListProperty}{QQmlListProperty<T>}.
\snippet examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.h 2
@@ -361,7 +361,7 @@ Q_PROPERTY(int size READ size CONSTANT)
\l {Extending QML - Object and List Property Types Example} shows the
complete code used to create the \c BirthdayParty type. For more
- information, visit \l{QDeclarativeListProperty}{QDeclarativeListProperty<T>}
+ information, visit \l{QQmlListProperty}{QQmlListProperty<T>}
for creating list properties.
\section2 Sequence Types
@@ -756,8 +756,8 @@ itself, the QML engine sets up an association between the value source and
the property.
Property value sources are special types that derive from the
-QDeclarativePropertyValueSource base class. This base class contains a single method,
-QDeclarativePropertyValueSource::setTarget(), that the QML engine invokes when
+QQmlPropertyValueSource base class. This base class contains a single method,
+QQmlPropertyValueSource::setTarget(), that the QML engine invokes when
associating the property value source with a property. The relevant part of
the \c HappyBirthdaySong type declaration looks like this:
@@ -771,7 +771,7 @@ contain properties, signals and methods just like other types.
When a property value source object is assigned to a property, QML first tries
to assign it normally, as though it were a regular QML type. Only if this
-assignment fails does the engine call the \l {QDeclarativePropertyValueSource::}{setTarget()} method. This allows
+assignment fails does the engine call the \l {QQmlPropertyValueSource::}{setTarget()} method. This allows
the type to also be used in contexts other than just as a value source.
\l {Extending QML - Property Value Source Example} shows the complete code used
diff --git a/doc/src/qml/qmlviewer.qdoc b/doc/src/qml/qmlviewer.qdoc
index 6439e95f4e..9006a053fc 100644
--- a/doc/src/qml/qmlviewer.qdoc
+++ b/doc/src/qml/qmlviewer.qdoc
@@ -160,7 +160,7 @@ QtObject { property int time: 54321 }
\endqml
To replace this with real data, you can simply bind the real data object to
-the root context in C++ using QDeclarativeContext::setContextProperty(). This
+the root context in C++ using QQmlContext::setContextProperty(). This
is detailed in \l {Using QML Bindings in C++ Applications}.
\section1 Using the \c runtime object
diff --git a/doc/src/qml/qtbinding.qdoc b/doc/src/qml/qtbinding.qdoc
index 10581857dc..7410836e9c 100644
--- a/doc/src/qml/qtbinding.qdoc
+++ b/doc/src/qml/qtbinding.qdoc
@@ -43,12 +43,12 @@ You may want to mix QML and C++ for a number of reasons. For example:
\o To use functionality defined in a C++ source (for example, when using a C++ Qt-based data model, or
calling functions in a third-party C++ library)
\o To access functionality in the Qt Declarative module (for example, to dynamically generate
-images using QDeclarativeImageProvider)
+images using QQmlImageProvider)
\o To write your own QML elements (whether for your applications, or for distribution to others)
\endlist
To use the Qt Declarative module, you must include and link to the module appropriately, as shown on
-the \l {QtDeclarative}{module index page}. The \l {Qt Declarative UI Runtime} documentation
+the \l {QtQml}{module index page}. The \l {Qt Declarative UI Runtime} documentation
shows how to build a basic C++ application that uses this module.
@@ -59,32 +59,32 @@ embedding QML into C++ applications. There are several core classes in the Qt De
that provide the essential capabilities for doing this. These are:
\list
-\o QDeclarativeEngine: A QML engine provides the environment for executing QML code. Every
+\o QQmlEngine: A QML engine provides the environment for executing QML code. Every
application requires at least one engine instance.
-\o QDeclarativeComponent: A component encapsulates a \l{QML Documents}{QML document}.
-\o QDeclarativeContext: A context allows an application to expose data to the QML components
+\o QQmlComponent: A component encapsulates a \l{QML Documents}{QML document}.
+\o QQmlContext: A context allows an application to expose data to the QML components
created by an engine.
\endlist
-A QDeclarativeEngine allows the configuration of global settings that apply to all of its QML
+A QQmlEngine allows the configuration of global settings that apply to all of its QML
component instances: for example, the QNetworkAccessManager to be used for network communications,
and the file path to be used for persistent storage.
-QDeclarativeComponent is used to load QML documents. Each QDeclarativeComponent instance represents
+QQmlComponent is used to load QML documents. Each QQmlComponent instance represents
a single document. A component can be created from the URL or file path of a QML document, or the raw
QML code of the document. Component instances are instatiated through the
-QDeclarativeComponent::create() method, like this:
+QQmlComponent::create() method, like this:
\code
-QDeclarativeEngine engine;
-QDeclarativeComponent component(&engine, QUrl::fromLocalFile("MyRectangle.qml"));
+QQmlEngine engine;
+QQmlComponent component(&engine, QUrl::fromLocalFile("MyRectangle.qml"));
QObject *rectangleInstance = component.create();
// ...
delete rectangleInstance;
\endcode
-QML documents can also be loaded using QDeclarativeView. This class provides a convenient
+QML documents can also be loaded using QQuickView. This class provides a convenient
QWidget-based view for embedding QML components into QGraphicsView-based applications. (For other
methods of integrating QML into QWidget-based applications, see \l {Integrating QML Code with existing Qt
UI code}.)
@@ -108,41 +108,41 @@ these methods throughout your application as appropriate.
\section2 Loading QML Components from C++
-A QML document can be loaded with QDeclarativeComponent or QDeclarativeView. QDeclarativeComponent
-loads a QML component as a C++ object; QDeclarativeView also does this,
+A QML document can be loaded with QQmlComponent or QQuickView. QQmlComponent
+loads a QML component as a C++ object; QQuickView also does this,
but additionally loads the QML component directly into a QGraphicsView. It is convenient for loading
a displayable QML component into a QWidget-based application.
For example, suppose there is a \c MyItem.qml file that looks like this:
-\snippet doc/src/snippets/declarative/qtbinding/loading/MyItem.qml start
-\snippet doc/src/snippets/declarative/qtbinding/loading/MyItem.qml end
+\snippet doc/src/snippets/qml/qtbinding/loading/MyItem.qml start
+\snippet doc/src/snippets/qml/qtbinding/loading/MyItem.qml end
-This QML document can be loaded with QDeclarativeComponent or QDeclarativeView with the following
-C++ code. Using a QDeclarativeComponent requires calling QDeclarativeComponent::create() to create
-a new instance of the component, while a QDeclarativeView automatically creates an instance of the
-component, which is accessible via QDeclarativeView::rootObject():
+This QML document can be loaded with QQmlComponent or QQuickView with the following
+C++ code. Using a QQmlComponent requires calling QQmlComponent::create() to create
+a new instance of the component, while a QQuickView automatically creates an instance of the
+component, which is accessible via QQuickView::rootObject():
\table
\row
\o
-\snippet doc/src/snippets/declarative/qtbinding/loading/main.cpp QDeclarativeComponent-a
+\snippet doc/src/snippets/qml/qtbinding/loading/main.cpp QQmlComponent-a
\dots 0
-\snippet doc/src/snippets/declarative/qtbinding/loading/main.cpp QDeclarativeComponent-b
+\snippet doc/src/snippets/qml/qtbinding/loading/main.cpp QQmlComponent-b
\o
-\snippet doc/src/snippets/declarative/qtbinding/loading/main.cpp QDeclarativeView
+\snippet doc/src/snippets/qml/qtbinding/loading/main.cpp QQuickView
\endtable
This \c object is the instance of the \c MyItem.qml component that has been created. You can now
-modify the item's properties using QObject::setProperty() or QDeclarativeProperty:
+modify the item's properties using QObject::setProperty() or QQmlProperty:
-\snippet doc/src/snippets/declarative/qtbinding/loading/main.cpp properties
+\snippet doc/src/snippets/qml/qtbinding/loading/main.cpp properties
Alternatively, you can cast the object to its actual type and call functions with compile-time
safety. In this case the base object of \c MyItem.qml is an \l Item, which is defined by the
-QDeclarativeItem class:
+QQuickItem class:
-\snippet doc/src/snippets/declarative/qtbinding/loading/main.cpp cast
+\snippet doc/src/snippets/qml/qtbinding/loading/main.cpp cast
You can also connect to any signals or call functions defined in the component using
QMetaObject::invokeMethod() and QObject::connect(). See \l {Exchanging data between QML and C++}
@@ -154,14 +154,14 @@ QML components are essentially object trees with children that have siblings and
Child objects of QML components can be located using the QObject::objectName property with
QObject::findChild(). For example, if the root item in \c MyItem.qml had a child \l Rectangle item:
-\snippet doc/src/snippets/declarative/qtbinding/loading/MyItem.qml start
+\snippet doc/src/snippets/qml/qtbinding/loading/MyItem.qml start
\codeline
-\snippet doc/src/snippets/declarative/qtbinding/loading/MyItem.qml child
-\snippet doc/src/snippets/declarative/qtbinding/loading/MyItem.qml end
+\snippet doc/src/snippets/qml/qtbinding/loading/MyItem.qml child
+\snippet doc/src/snippets/qml/qtbinding/loading/MyItem.qml end
The child could be located like this:
-\snippet doc/src/snippets/declarative/qtbinding/loading/main.cpp findChild
+\snippet doc/src/snippets/qml/qtbinding/loading/main.cpp findChild
If \c objectName is used inside a delegate of a ListView, \l Repeater or some other
element that creates multiple instances of its delegates, there will be multiple children with
@@ -181,18 +181,18 @@ the QML user interface implementation and the composition of the QML object tree
\section2 Embedding C++ Objects into QML Components
When loading a QML scene into a C++ application, it can be useful to directly embed C++ data into
-the QML object. QDeclarativeContext enables this by exposing data to the context of a QML
+the QML object. QQmlContext enables this by exposing data to the context of a QML
component, allowing data to be injected from C++ into QML.
For example, here is a QML item that refers to a \c currentDateTime value that does not exist in
the current scope:
-\snippet doc/src/snippets/declarative/qtbinding/context/MyItem.qml 0
+\snippet doc/src/snippets/qml/qtbinding/context/MyItem.qml 0
This \c currentDateTime value can be set directly by the C++ application that loads the QML
-component, using QDeclarativeContext::setContextProperty():
+component, using QQmlContext::setContextProperty():
-\snippet doc/src/snippets/declarative/qtbinding/context/main.cpp 0
+\snippet doc/src/snippets/qml/qtbinding/context/main.cpp 0
Context properties can hold either QVariant or QObject* values. This means custom C++ objects can
also be injected using this approach, and these objects can be modified and read directly in QML.
@@ -202,11 +202,11 @@ invokes a method on the object instance:
\table
\row
\o
-\snippet doc/src/snippets/declarative/qtbinding/context-advanced/applicationdata.h 0
+\snippet doc/src/snippets/qml/qtbinding/context-advanced/applicationdata.h 0
\codeline
-\snippet doc/src/snippets/declarative/qtbinding/context-advanced/main.cpp 0
+\snippet doc/src/snippets/qml/qtbinding/context-advanced/main.cpp 0
\o
-\snippet doc/src/snippets/declarative/qtbinding/context-advanced/MyItem.qml 0
+\snippet doc/src/snippets/qml/qtbinding/context-advanced/MyItem.qml 0
\endtable
(Note that date/time values returned from C++ to QML can be formatted through
@@ -217,7 +217,7 @@ If the QML item needs to receive signals from the context property, it can conne
dataChanged(), this signal can be connected to using an \c onDataChanged handler within
a \l Connections object:
-\snippet doc/src/snippets/declarative/qtbinding/context-advanced/connections.qml 0
+\snippet doc/src/snippets/qml/qtbinding/context-advanced/connections.qml 0
Context properties can be useful for using C++ based data models in a QML view. See the
\l {declarative/modelviews/stringlistmodel}{String ListModel},
@@ -226,7 +226,7 @@ Context properties can be useful for using C++ based data models in a QML view.
respective examples on using QStringListModel, QObjectList-based models and QAbstractItemModel
in QML views.
-Also see the QDeclarativeContext documentation for more information.
+Also see the QQmlContext documentation for more information.
\section2 Defining New QML Elements
@@ -236,30 +236,30 @@ defined by C++ classes; in fact, many of the core \l {QML Elements} are implemen
C++ classes. When you create a QML object using one of these elements, you are simply creating an
instance of a QObject-based C++ class and setting its properties.
-To create a visual item that fits in with the Qt Quick elements, base your class off \l QDeclarativeItem instead of QObject directly.
-You can then implement your own painting and functionality like any other QGraphicsObject. Note that QGraphicsItem::ItemHasNoContents is set by default on QDeclarativeItem because
+To create a visual item that fits in with the Qt Quick elements, base your class off \l QQuickItem instead of QObject directly.
+You can then implement your own painting and functionality like any other QGraphicsObject. Note that QGraphicsItem::ItemHasNoContents is set by default on QQuickItem because
it does not paint anything; you will need to clear this if your item is supposed to paint anything (as opposed to being solely for input handling or logical grouping).
For example, here is an \c ImageViewer class with an \c image URL property:
-\snippet doc/src/snippets/declarative/qtbinding/newelements/imageviewer.h 0
+\snippet doc/src/snippets/qml/qtbinding/newelements/imageviewer.h 0
-Aside from the fact that it inherits QDeclarativeItem, this is an ordinary class that could
+Aside from the fact that it inherits QQuickItem, this is an ordinary class that could
exist outside of QML. However, once it is registered with the QML engine using qmlRegisterType():
-\snippet doc/src/snippets/declarative/qtbinding/newelements/main.cpp register
+\snippet doc/src/snippets/qml/qtbinding/newelements/main.cpp register
-Then, any QML code loaded by your C++ application or \l{QDeclarativeExtensionPlugin}{plugin} can create and manipulate
+Then, any QML code loaded by your C++ application or \l{QQmlExtensionPlugin}{plugin} can create and manipulate
\c ImageViewer objects:
-\snippet doc/src/snippets/declarative/qtbinding/newelements/standalone.qml 0
+\snippet doc/src/snippets/qml/qtbinding/newelements/standalone.qml 0
-It is advised that you avoid using QGraphicsItem functionality beyond the properties documented in QDeclarativeItem.
+It is advised that you avoid using QGraphicsItem functionality beyond the properties documented in QQuickItem.
This is because the GraphicsView backend is intended to be an implementation detail for QML, so the QtQuick items can be moved to faster backends as they become available with no change from a QML perspective.
-To minimize any porting requirements for custom visual items, try to stick to the documented properties in QDeclarativeItem where possible. Properties QDeclarativeItem inherits but doesn't document are classed as implementation details; they are not officially supported and may disappear between releases.
+To minimize any porting requirements for custom visual items, try to stick to the documented properties in QQuickItem where possible. Properties QQuickItem inherits but doesn't document are classed as implementation details; they are not officially supported and may disappear between releases.
-Note that custom C++ types do not have to inherit from QDeclarativeItem; this is only necessary if it is
+Note that custom C++ types do not have to inherit from QQuickItem; this is only necessary if it is
a displayable item. If the item is not displayable, it can simply inherit from QObject.
For more information on defining new QML elements, see the \l {Tutorial: Writing QML extensions with C++}
@@ -286,8 +286,8 @@ QMetaObject::invokeMethod(). Here is a C++ application that uses this to call a
\table
\row
-\o \snippet doc/src/snippets/declarative/qtbinding/functions-qml/MyItem.qml 0
-\o \snippet doc/src/snippets/declarative/qtbinding/functions-qml/main.cpp 0
+\o \snippet doc/src/snippets/qml/qtbinding/functions-qml/MyItem.qml 0
+\o \snippet doc/src/snippets/qml/qtbinding/functions-qml/main.cpp 0
\endtable
Notice the Q_RETURN_ARG() and Q_ARG() arguments for QMetaObject::invokeMethod() must be specified as
@@ -295,16 +295,16 @@ QVariant types, as this is the generic data type used for QML functions and retu
To call a C++ function from QML, the function must be either a Qt slot, or a function marked with
the Q_INVOKABLE macro, to be available to QML. In the following example, the QML code invokes
-methods on the \c myObject object, which has been set using QDeclarativeContext::setContextProperty():
+methods on the \c myObject object, which has been set using QQmlContext::setContextProperty():
\table
\row
\o
-\snippet doc/src/snippets/declarative/qtbinding/functions-cpp/MyItem.qml 0
+\snippet doc/src/snippets/qml/qtbinding/functions-cpp/MyItem.qml 0
\o
-\snippet doc/src/snippets/declarative/qtbinding/functions-cpp/myclass.h 0
+\snippet doc/src/snippets/qml/qtbinding/functions-cpp/myclass.h 0
\codeline
-\snippet doc/src/snippets/declarative/qtbinding/functions-cpp/main.cpp 0
+\snippet doc/src/snippets/qml/qtbinding/functions-cpp/main.cpp 0
\endtable
QML supports the calling of overloaded C++ functions. If there are multiple C++ functions with the
@@ -325,11 +325,11 @@ is emitted:
\table
\row
\o
-\snippet doc/src/snippets/declarative/qtbinding/signals-qml/MyItem.qml 0
+\snippet doc/src/snippets/qml/qtbinding/signals-qml/MyItem.qml 0
\o
-\snippet doc/src/snippets/declarative/qtbinding/signals-qml/myclass.h 0
+\snippet doc/src/snippets/qml/qtbinding/signals-qml/myclass.h 0
\codeline
-\snippet doc/src/snippets/declarative/qtbinding/signals-qml/main.cpp 0
+\snippet doc/src/snippets/qml/qtbinding/signals-qml/main.cpp 0
\endtable
To connect to Qt C++ signals from within QML, use a signal handler with the \c on<SignalName> syntax.
@@ -342,12 +342,12 @@ C++ object are connected to through \c onImagedChanged and \c onLoadingError sig
\row
\o
-\snippet doc/src/snippets/declarative/qtbinding/signals-cpp/imageviewer.h start
+\snippet doc/src/snippets/qml/qtbinding/signals-cpp/imageviewer.h start
\dots 4
-\snippet doc/src/snippets/declarative/qtbinding/signals-cpp/imageviewer.h end
+\snippet doc/src/snippets/qml/qtbinding/signals-cpp/imageviewer.h end
\o
-\snippet doc/src/snippets/declarative/qtbinding/signals-cpp/standalone.qml 0
+\snippet doc/src/snippets/qml/qtbinding/signals-cpp/standalone.qml 0
\endtable
(Note that if a signal has been declared as the NOTIFY signal for a property, QML allows it to be
@@ -357,13 +357,13 @@ received with an \c on<Property>Changed handler even if the signal's name does n
If, however, the object with the signal is not created from within the QML code, and the QML item only has a
reference to the created object - for example, if the object was set using
-QDeclarativeContext::setContextProperty() - then the \l Connections element can be used
+QQmlContext::setContextProperty() - then the \l Connections element can be used
instead to create the signal handler:
\table
\row
-\o \snippet doc/src/snippets/declarative/qtbinding/signals-cpp/main.cpp connections
-\o \snippet doc/src/snippets/declarative/qtbinding/signals-cpp/MyItem.qml 0
+\o \snippet doc/src/snippets/qml/qtbinding/signals-cpp/main.cpp connections
+\o \snippet doc/src/snippets/qml/qtbinding/signals-cpp/MyItem.qml 0
\endtable
C++ signals can use enum values as parameters provided that the enum is declared in the
@@ -376,14 +376,14 @@ See \l {Using enumerations of a custom type} below for details.
Any properties declared in a QML object are automatically accessible from C++. Given a QML item
like this:
-\snippet doc/src/snippets/declarative/qtbinding/properties-qml/MyItem.qml 0
+\snippet doc/src/snippets/qml/qtbinding/properties-qml/MyItem.qml 0
-The value of the \c someNumber property can be set and read using QDeclarativeProperty, or
+The value of the \c someNumber property can be set and read using QQmlProperty, or
QObject::setProperty() and QObject::property():
-\snippet doc/src/snippets/declarative/qtbinding/properties-qml/main.cpp 0
+\snippet doc/src/snippets/qml/qtbinding/properties-qml/main.cpp 0
-You should always use QObject::setProperty(), QDeclarativeProperty or QMetaProperty::write() to
+You should always use QObject::setProperty(), QQmlProperty or QMetaProperty::write() to
change a QML property value, to ensure the QML engine is made aware of the property change. For example,
say you have a custom element \c PushButton with a \c buttonText property that internally reflects
the value of a \c m_buttonText member variable. Modifying the member variable directly like this is
@@ -391,7 +391,7 @@ not a good idea:
\badcode
// BAD!
-QDeclarativeComponent component(engine, "MyButton.qml");
+QQmlComponent component(engine, "MyButton.qml");
PushButton *button = qobject_cast<PushButton*>(component.create());
button->m_buttonText = "Click me";
\endcode
@@ -410,8 +410,8 @@ property. This property can be written to and read from QML:
\table
\row
-\o \snippet doc/src/snippets/declarative/qtbinding/properties-cpp/applicationdata.h 0
-\o \snippet doc/src/snippets/declarative/qtbinding/properties-cpp/MyItem.qml 0
+\o \snippet doc/src/snippets/qml/qtbinding/properties-cpp/applicationdata.h 0
+\o \snippet doc/src/snippets/qml/qtbinding/properties-cpp/MyItem.qml 0
\endtable
Notice the \c backgroundColorChanged signal is declared as the NOTIFY signal for the
@@ -468,8 +468,8 @@ converted to JavaScript array and object values, repectively:
\o String format
\o Example
\row
-\o \snippet doc/src/snippets/declarative/qtbinding/variantlistmap/MyItem.qml 0
-\o \snippet doc/src/snippets/declarative/qtbinding/variantlistmap/main.cpp 0
+\o \snippet doc/src/snippets/qml/qtbinding/variantlistmap/MyItem.qml 0
+\o \snippet doc/src/snippets/qml/qtbinding/variantlistmap/main.cpp 0
\endtable
This produces output like:
@@ -492,13 +492,13 @@ side, and is automatically converted to a QVariantList or QVariantMap when it is
To use an enumeration from a custom C++ component, the enumeration must be declared with Q_ENUMS() to
register it with Qt's meta object system. For example, the following C++ type has a \c Status enum:
-\snippet doc/src/snippets/declarative/qtbinding/enums/imageviewer.h start
-\snippet doc/src/snippets/declarative/qtbinding/enums/imageviewer.h end
+\snippet doc/src/snippets/qml/qtbinding/enums/imageviewer.h start
+\snippet doc/src/snippets/qml/qtbinding/enums/imageviewer.h end
Providing the \c ImageViewer class has been registered using qmlRegisterType(), its \c Status enum can
now be used from QML:
-\snippet doc/src/snippets/declarative/qtbinding/enums/standalone.qml 0
+\snippet doc/src/snippets/qml/qtbinding/enums/standalone.qml 0
The C++ type must be registered with QML to use its enums. If your C++ type is not instantiable, it
can be registered using qmlRegisterUncreatableType(). To be accessible from QML, the names of enum values
@@ -525,7 +525,7 @@ function, the enum type must be registered using qRegisterMetaType().
For QML signals, enum values may be used as signal parameters using the \c int type:
-\snippet doc/src/snippets/declarative/qtbinding/enums/standalone.qml 1
+\snippet doc/src/snippets/qml/qtbinding/enums/standalone.qml 1
\section2 Automatic Type Conversion from Strings
@@ -594,11 +594,11 @@ a QColor-type property or to call a C++ function that requires a QColor paramete
\section1 Writing QML plugins
-The Qt Declarative module includes the QDeclarativeExtensionPlugin class, which is an abstract
+The Qt Declarative module includes the QQmlExtensionPlugin class, which is an abstract
class for writing QML plugins. This allows QML extension types to be dynamically loaded into
QML applications.
-See the QDeclarativeExtensionPlugin documentation and \l {How to Create Qt Plugins} for more
+See the QQmlExtensionPlugin documentation and \l {How to Create Qt Plugins} for more
details.
@@ -643,22 +643,22 @@ project
The \c main.qml and \c background.png files will be packaged as resource files. This is
done in the \c example.qrc resource collection file:
-\quotefile doc/src/snippets/declarative/qtbinding/resources/example.qrc
+\quotefile doc/src/snippets/qml/qtbinding/resources/example.qrc
Since \c background.png is a resource file, \c main.qml can refer to it using the relative
path specified in \c example.qrc:
-\snippet doc/src/snippets/declarative/qtbinding/resources/main.qml 0
+\snippet doc/src/snippets/qml/qtbinding/resources/main.qml 0
To allow QML to locate resource files correctly, the \c main.cpp loads the main QML
file, \c main.qml, as a resource file using the \c qrc scheme:
-\snippet doc/src/snippets/declarative/qtbinding/resources/main.cpp 0
+\snippet doc/src/snippets/qml/qtbinding/resources/main.cpp 0
Finally \c project.pro uses the RESOURCES variable to indicate that \c example.qrc should
be used to build the application resources:
-\quotefile doc/src/snippets/declarative/qtbinding/resources/resources.pro
+\quotefile doc/src/snippets/qml/qtbinding/resources/resources.pro
See \l {The Qt Resource System} for more information.
diff --git a/doc/src/qml/qtdeclarative.qdoc b/doc/src/qml/qtdeclarative.qdoc
index c4b59fb07b..9d14f7fc57 100644
--- a/doc/src/qml/qtdeclarative.qdoc
+++ b/doc/src/qml/qtdeclarative.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
- \module QtDeclarative
+ \module QtQml
\title Qt Declarative Module
\ingroup modules
@@ -37,7 +37,7 @@
following directive:
\code
- #include <QtDeclarative>
+ #include <QtQml>
\endcode
To link against the module, add this line to your \l qmake \c
@@ -54,16 +54,16 @@
/*!
\macro QML_DECLARE_TYPE()
- \relates QDeclarativeEngine
+ \relates QQmlEngine
- Equivalent to \c Q_DECLARE_METATYPE(TYPE *) and \c Q_DECLARE_METATYPE(QDeclarativeListProperty<TYPE>)
+ Equivalent to \c Q_DECLARE_METATYPE(TYPE *) and \c Q_DECLARE_METATYPE(QQmlListProperty<TYPE>)
- #include <QtDeclarative> to use this macro.
+ #include <QtQml> to use this macro.
*/
/*!
\macro QML_DECLARE_TYPEINFO(Type,Flags)
- \relates QDeclarativeEngine
+ \relates QQmlEngine
Declares additional properties of the given \a Type as described by the
specified \a Flags.
@@ -71,13 +71,13 @@
Current the only supported type info is \c QML_HAS_ATTACHED_PROPERTIES which
declares that the \a Type supports \l {Attached Properties}.
- #include <QtDeclarative> to use this macro.
+ #include <QtQml> to use this macro.
*/
/*!
\fn int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName)
- \relates QDeclarativeEngine
+ \relates QQmlEngine
This template function registers the C++ type in the QML system with
the name \a qmlName, in the library imported from \a uri having the
@@ -105,7 +105,7 @@
"com.mycompany.qmlcomponents":
\code
- #include <QtDeclarative>
+ #include <QtQml>
...
@@ -131,7 +131,7 @@
/*!
\fn int qmlRegisterRevision(const char *uri, int versionMajor, int versionMinor)
- \relates QDeclarativeEngine
+ \relates QQmlEngine
This template function registers the specified revision of a C++ type in the QML system with
the library imported from \a uri having the version number composed
@@ -150,7 +150,7 @@
/*!
\fn int qmlRegisterUncreatableType(const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString& message)
- \relates QDeclarativeEngine
+ \relates QQmlEngine
This template function registers the C++ type in the QML system with
the name \a qmlName, in the library imported from \a uri having the
@@ -163,14 +163,14 @@
Returns the QML type id.
- #include <QtDeclarative> to use this function.
+ #include <QtQml> to use this function.
\sa qmlRegisterTypeNotAvailable()
*/
/*!
\fn int qmlRegisterTypeNotAvailable(const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString& message)
- \relates QDeclarativeEngine
+ \relates QQmlEngine
This function registers a type in the QML system with the name \a qmlName, in the library imported from \a uri having the
version number composed from \a versionMajor and \a versionMinor, but any attempt to instantiate the type
@@ -200,40 +200,40 @@
Without this, a generic "Game is not a type" message would be given.
- #include <QtDeclarative> to use this function.
+ #include <QtQml> to use this function.
\sa qmlRegisterUncreatableType()
*/
/*!
\fn int qmlRegisterType()
- \relates QDeclarativeEngine
+ \relates QQmlEngine
\overload
This template function registers the C++ type in the QML
system. Instances of this type cannot be created from the QML
system.
- #include <QtDeclarative> to use this function.
+ #include <QtQml> to use this function.
Returns the QML type id.
*/
/*!
\fn int qmlRegisterInterface(const char *typeName)
- \relates QDeclarativeEngine
+ \relates QQmlEngine
This template function registers the C++ type in the QML system
under the name \a typeName.
- #include <QtDeclarative> to use this function.
+ #include <QtQml> to use this function.
Returns the QML type id.
*/
/*!
- \fn int qmlRegisterModuleApi(const char *uri, int versionMajor, int versionMinor, QJSValue (*callback)(QDeclarativeEngine *, QJSEngine *))
- \relates QDeclarativeEngine
+ \fn int qmlRegisterModuleApi(const char *uri, int versionMajor, int versionMinor, QJSValue (*callback)(QQmlEngine *, QJSEngine *))
+ \relates QQmlEngine
This function may be used to register a module API provider \a callback in a particular \a uri
with a version specified in \a versionMajor and \a versionMinor.
@@ -250,7 +250,7 @@
Usage:
\code
// first, define the module API provider function (callback).
- static QJSValue *example_qjsvalue_module_api_provider(QDeclarativeEngine *engine, QJSEngine *scriptEngine)
+ static QJSValue *example_qjsvalue_module_api_provider(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine)
@@ -278,8 +278,8 @@
*/
/*!
- \fn int qmlRegisterModuleApi(const char *uri, int versionMajor, int versionMinor, QObject *(*callback)(QDeclarativeEngine *, QJSEngine *))
- \relates QDeclarativeEngine
+ \fn int qmlRegisterModuleApi(const char *uri, int versionMajor, int versionMinor, QObject *(*callback)(QQmlEngine *, QJSEngine *))
+ \relates QQmlEngine
This function may be used to register a module API provider \a callback in a particular \a uri
with a version specified in \a versionMajor and \a versionMinor.
@@ -325,7 +325,7 @@
};
// second, define the module API provider function (callback).
- static QObject *example_qobject_module_api_provider(QDeclarativeEngine *engine, QJSEngine *scriptEngine)
+ static QObject *example_qobject_module_api_provider(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine)
Q_UNUSED(scriptEngine)
diff --git a/doc/src/qml/qtprogrammers.qdoc b/doc/src/qml/qtprogrammers.qdoc
index 215f71859c..9338a2c29f 100644
--- a/doc/src/qml/qtprogrammers.qdoc
+++ b/doc/src/qml/qtprogrammers.qdoc
@@ -44,7 +44,7 @@ QML provides direct access to the following concepts from Qt:
\o QAction - the \l {QML Basic Types}{action} type
\o QObject signals and slots - available as functions to call in JavaScript
\o QObject properties - available as variables in JavaScript
- \o QWidget - QDeclarativeView is a QML-displaying widget
+ \o QWidget - QQuickView is a QML-displaying widget
\o Qt models - used directly in data binding (QAbstractItemModel)
\endlist
@@ -71,12 +71,12 @@ QML Items also serve these purposes. Each is considered separately below.
\section2 Simple Widgets
-The most important rule to remember while implementing a new QDeclarativeItem in C++
+The most important rule to remember while implementing a new QQuickItem in C++
is that it should not contain any look and feel policies; leave that to the QML
usage of the item.
As an example, imagine you wanted a reusable Button item. If you therefore decided
-to write a QDeclarativeItem subclass to implement a button, just as QToolButton
+to write a QQuickItem subclass to implement a button, just as QToolButton
subclasses QWidget for this purpose, following the rule above, your
\c QDeclarativeButton would not have any appearance; just the notions of enabled,
triggering, etc.
@@ -92,7 +92,7 @@ between states, and exactly how it responds to mouse, key, or touch input, shoul
all be left for definition in QML.
It is illustrative to note that QDeclarativeTextEdit is built upon QTextControl,
-QDeclarativeWebView is built upon QWebPage, and ListView uses QAbstractItemModel,
+QQuickWebView is built upon QWebPage, and ListView uses QAbstractItemModel,
just as QTextEdit, QWebView, and QListView are built upon those same UI-agnostic
components.
@@ -167,7 +167,7 @@ QGraphicsWidgets are usually designed to be laid out with QGraphicsLayouts. QML
not use QGraphicsLayouts, as the Qt layouts do not mix well with animated and fluid
UIs, so the geometry interface is one of the main differences. When writing QML
elements, you allow the designers to place their bounding rectangle using absolute
-geometry, bindings or anchors (all set up for you when you inherit QDeclarativeItem)
+geometry, bindings or anchors (all set up for you when you inherit QQuickItem)
and you do not use layouts or size hints. If size hints are appropriate, then place
them in the QML documentation so that the designers know how to use the item best,
but still have complete control over the look and feel.
@@ -182,14 +182,14 @@ look and feel (which involves the UI logic) can be written in QML.
Both differences are caused by the different method of interaction. QGraphicsWidget
is a QGraphicsObject subclass which makes fluid UI development from C++ easier, and
-QDeclarativeItem is a QGraphicsObject subclass which makes fluid UI development
+QQuickItem is a QGraphicsObject subclass which makes fluid UI development
from QML easier. The difference, therefore, is primarily one of the interface
exposed, and the design of the items that come with it; the declarative primitives
for QML and nothing for QGraphicsWidget, because you need to write your own UI
logic into the subclass.
If you wish to use both QML and C++ to write the UI, for example to ease the
-transition period, it is recommended to use QDeclarativeItem subclasses, although
+transition period, it is recommended to use QQuickItem subclasses, although
you can use QGraphicsWidgets as well. To allow for easier use from C++, make the
root item of each C++ component a \l LayoutItem, and load individual "widgets" of
QML (possibly comprised of multiple files, and containing a self-contained bundle
diff --git a/doc/src/qtquick2/animation.qdoc b/doc/src/qtquick2/animation.qdoc
index 626571f50e..cf656fb209 100644
--- a/doc/src/qtquick2/animation.qdoc
+++ b/doc/src/qtquick2/animation.qdoc
@@ -76,14 +76,14 @@ There are several ways of setting animation to an object.
To create an immediate movement or animated movement, set the property value
directly. This may be done in signal handlers or attached properties.
-\snippet doc/src/snippets/declarative/animation.qml direct property change
+\snippet doc/src/snippets/qml/animation.qml direct property change
However, to create more control, \i {property animations} apply smooth movements
by interpolating values between property value changes. Property animations
provide timing controls and allows different interpolations through
\l{qml-easing-animation}{easing curves}.
-\snippet doc/src/snippets/declarative/animation.qml property animation
+\snippet doc/src/snippets/qml/animation.qml property animation
Specialized \l{qml-property-animation-elements}{property animation elements}
have more efficient implementations than the \l{PropertyAnimation} element. They
@@ -112,14 +112,14 @@ change from the \c pressed state to the \c released state. Likewise, there would
be an animation during the change from the \c released state to the \c pressed
state.
-\snippet doc/src/snippets/declarative/animation.qml transition animation
+\snippet doc/src/snippets/qml/animation.qml transition animation
Binding the \c to and \c from properties to the state's name will assign that
particular transition to the state change. For simple or symmetric transitions,
setting the to \c to property to the wild card symbol, "\c{*}", denotes
that the transition applies to any state change.
-\snippet doc/src/snippets/declarative/animation.qml wildcard animation
+\snippet doc/src/snippets/qml/animation.qml wildcard animation
\section2 Default Animation as Behaviors
@@ -133,7 +133,7 @@ A ball component might have a behavior animation assigned to its \c x, \c y, and
elastic effect. In effect, this behavior animation would apply the elastic
effect to the properties whenever the ball moves.
-\snippet doc/src/snippets/declarative/animation.qml behavior animation
+\snippet doc/src/snippets/qml/animation.qml behavior animation
There are several methods of assigning behavior animations to properties. The
\c{Behavior on <property>} declaration is a convenient way of assigning a
@@ -156,7 +156,7 @@ object. Using the \l{SequentialAnimation} element, the opacity animations will
play after the preceding animation finishes. The \l{ParallelAnimation} element
will play the animations at the same time.
-\snippet doc/src/snippets/declarative/animation.qml sequential animation
+\snippet doc/src/snippets/qml/animation.qml sequential animation
Once individual animations are placed into a SequentialAnimation or
ParallelAnimation, they can no longer be started and stopped independently. The
@@ -257,15 +257,15 @@ Rectangle {
-\snippet doc/src/snippets/declarative/animation-elements.qml color
-\snippet doc/src/snippets/declarative/animation-propertyvaluesource.qml 0
-\snippet doc/src/snippets/declarative/animation-signalhandler.qml 0
-\snippet doc/src/snippets/declarative/animation-standalone.qml 0
+\snippet doc/src/snippets/qml/animation-elements.qml color
+\snippet doc/src/snippets/qml/animation-propertyvaluesource.qml 0
+\snippet doc/src/snippets/qml/animation-signalhandler.qml 0
+\snippet doc/src/snippets/qml/animation-standalone.qml 0
-\snippet doc/src/snippets/declarative/animation-transitions.qml 0
-\snippet doc/src/snippets/declarative/animation-groups.qml 0
+\snippet doc/src/snippets/qml/animation-transitions.qml 0
+\snippet doc/src/snippets/qml/animation-groups.qml 0
-\snippet doc/src/snippets/declarative/animation-groups.qml 1
-\snippet doc/src/snippets/declarative/animation-groups.qml 0
+\snippet doc/src/snippets/qml/animation-groups.qml 1
+\snippet doc/src/snippets/qml/animation-groups.qml 0
\image propanim.gif
diff --git a/doc/src/qtquick2/focus.qdoc b/doc/src/qtquick2/focus.qdoc
index 05d797e7be..e2c4c79d3c 100644
--- a/doc/src/qtquick2/focus.qdoc
+++ b/doc/src/qtquick2/focus.qdoc
@@ -43,7 +43,7 @@ and to address some of the cases unique to fluid user interfaces, the QML items
When the user presses or releases a key, the following occurs:
\list 1
\o Qt receives the key action and generates a key event.
-\o If the Qt widget containing the \l QDeclarativeView has focus, the key event
+\o If the Qt widget containing the \l QQuickView has focus, the key event
is delivered to it. Otherwise, regular Qt key handling continues.
\o The key event is delivered by the scene to the QML \l Item with
\i {active focus}. If no Item has active focus, the key event is
@@ -56,8 +56,8 @@ If the \c {Rectangle} element in the following example has active focus and the
it will bubble up to its parent. However, pressing the \c B key will bubble up to the root
item and thus subsequently be ignored.
-\snippet doc/src/snippets/declarative/focus/rectangle.qml simple key event
-\snippet doc/src/snippets/declarative/focus/rectangle.qml simple key event end
+\snippet doc/src/snippets/qml/focus/rectangle.qml simple key event
+\snippet doc/src/snippets/qml/focus/rectangle.qml simple key event end
\o If the root \l Item is reached, the key event is \l {QEvent::ignore()}{ignored} and regular Qt key handling continues.
@@ -71,7 +71,7 @@ Whether or not an \l Item has active focus can be queried through the
property \c {Item::activeFocus} property. For example, here we have a \l Text
element whose text is determined by whether or not it has active focus.
-\snippet doc/src/snippets/declarative/focus/rectangle.qml active focus
+\snippet doc/src/snippets/qml/focus/rectangle.qml active focus
\section1 Acquiring Focus and Focus Scopes
@@ -82,7 +82,7 @@ sufficient. If we run the following example with the \l {QML Viewer}, we see tha
the \c {keyHandler} element has active focus and pressing the \c A, \c B,
or \c C keys modifies the text appropriately.
-\snippet doc/src/snippets/declarative/focus/basicwidget.qml focus true
+\snippet doc/src/snippets/qml/focus/basicwidget.qml focus true
\image declarative-qmlfocus1.png
@@ -95,10 +95,10 @@ set the first one to have focus. The intention is that when the \c A, \c B, or
responds accordingly.
The code that imports and creates two MyWidget instances:
-\snippet doc/src/snippets/declarative/focus/widget.qml window
+\snippet doc/src/snippets/qml/focus/widget.qml window
The MyWidget code:
-\snippet doc/src/snippets/declarative/focus/MyWidget.qml mywidget
+\snippet doc/src/snippets/qml/focus/MyWidget.qml mywidget
We would like to have the first MyWidget object to have the focus by setting its
\c focus property to \c true. However, by running the code, we can confirm that
@@ -126,7 +126,7 @@ A focus scope is created by declaring the \l FocusScope element.
In the next example, a \l FocusScope element is added to the component, and the
visual result shown.
-\snippet doc/src/snippets/declarative/focus/myfocusscopewidget.qml widget in focusscope
+\snippet doc/src/snippets/qml/focus/myfocusscopewidget.qml widget in focusscope
\image declarative-qmlfocus3.png
@@ -158,10 +158,10 @@ Now, clicking either MyClickableWidget gives it focus and the other widget
loses the focus.
The code that imports and creates two MyClickableWidget instances:
-\snippet doc/src/snippets/declarative/focus/clickablewidget.qml clickable window
+\snippet doc/src/snippets/qml/focus/clickablewidget.qml clickable window
The MyClickableWidget code:
-\snippet doc/src/snippets/declarative/focus/MyClickableWidget.qml clickable in focusscope
+\snippet doc/src/snippets/qml/focus/MyClickableWidget.qml clickable in focusscope
\image declarative-qmlfocus4.png
@@ -188,7 +188,7 @@ current item delegate to react to key presses.
This contrived example shows how this works. Pressing the \c Return key will
print the name of the current list item.
-\snippet doc/src/snippets/declarative/focus/advancedFocus.qml FocusScope delegate
+\snippet doc/src/snippets/qml/focus/advancedFocus.qml FocusScope delegate
\image declarative-qmlfocus5.png
diff --git a/doc/src/qtquick2/modelview.qdoc b/doc/src/qtquick2/modelview.qdoc
index 56c726eab8..5d799027ad 100644
--- a/doc/src/qtquick2/modelview.qdoc
+++ b/doc/src/qtquick2/modelview.qdoc
@@ -80,13 +80,13 @@ To visualize data, bind the view's \c model property to a model and the
Suppose that a specific club wants to decorate its members list with its brand
colors. A member list is in a \c model and the \c delegate will display the
model's content.
- \snippet doc/src/snippets/declarative/listview-decorations.qml model
- \snippet doc/src/snippets/declarative/listview-decorations.qml delegate
+ \snippet doc/src/snippets/qml/listview-decorations.qml model
+ \snippet doc/src/snippets/qml/listview-decorations.qml delegate
The club may decorate the members list by binding visual objects to the \c
header and \c footer properties. The visual object may be defined inline, in
another file, or in a \l {Component} element.
- \snippet doc/src/snippets/declarative/listview-decorations.qml decorations
+ \snippet doc/src/snippets/qml/listview-decorations.qml decorations
\image listview-decorations.png
\section2 Mouse and Touch Handling
@@ -110,8 +110,8 @@ To visualize data, bind the view's \c model property to a model and the
A list may contain a list indicating people's names and the team on which
team the person belongs.
- \snippet doc/src/snippets/declarative/listview-sections.qml model
- \snippet doc/src/snippets/declarative/listview-sections.qml delegate
+ \snippet doc/src/snippets/qml/listview-sections.qml model
+ \snippet doc/src/snippets/qml/listview-sections.qml delegate
The ListView element has the \c section \l{Property Binding in QML#Attached
Properties}{attached property} that can combine adjacent and related
@@ -119,7 +119,7 @@ To visualize data, bind the view's \c model property to a model and the
which list element property to use as sections. The \c criteria can dictate
how the section names are displayed and the \c delegate is similar to the
views' \l {qml-view-delegate}{delegate} property.
- \snippet doc/src/snippets/declarative/listview-sections.qml section
+ \snippet doc/src/snippets/qml/listview-sections.qml section
\image listview-section.png
\keyword qml-view-delegate
@@ -129,7 +129,7 @@ To visualize data, bind the view's \c model property to a model and the
visualize each item list according to the template defined by the delegate.
Items in a model are accessible through the \c index property as well as the
item's properties.
- \snippet doc/src/snippets/declarative/listview.qml delegate
+ \snippet doc/src/snippets/qml/listview.qml delegate
\image listview-setup.png
\section2 Accessing Views and Models from Delegates
@@ -150,7 +150,7 @@ To visualize data, bind the view's \c model property to a model and the
the model, and the color of one of the fields depends on the property
\i{fruit_color} of the view.
- \snippet doc/src/snippets/declarative/models/views-models-delegates.qml rectangle
+ \snippet doc/src/snippets/qml/models/views-models-delegates.qml rectangle
\keyword qml-data-models
\section1 Models
@@ -159,7 +159,7 @@ To visualize data, bind the view's \c model property to a model and the
bind to. Here is a ListModel with two roles, \i type and \i age, and a
ListView with a delegate that binds to these roles to display their values:
- \snippet doc/src/snippets/declarative/qml-data-models/listmodel-listview.qml document
+ \snippet doc/src/snippets/qml/qml-data-models/listmodel-listview.qml document
If there is a naming clash between the model's properties and the delegate's
properties, the roles can be accessed with the qualified \i model name
@@ -197,12 +197,12 @@ To visualize data, bind the view's \c model property to a model and the
ListModel is a simple hierarchy of elements specified in QML. The
available roles are specified by the \l ListElement properties.
- \snippet doc/src/snippets/declarative/qml-data-models/listelements.qml model
+ \snippet doc/src/snippets/qml/qml-data-models/listelements.qml model
The above model has two roles, \i name and \i cost. These can be bound
to by a ListView delegate, for example:
- \snippet doc/src/snippets/declarative/qml-data-models/listelements.qml view
+ \snippet doc/src/snippets/qml/qml-data-models/listelements.qml view
ListModel provides methods to manipulate the ListModel directly via JavaScript.
In this case, the first item inserted determines the roles available
@@ -210,9 +210,9 @@ To visualize data, bind the view's \c model property to a model and the
created and populated via JavaScript, the roles provided by the first
insertion are the only roles that will be shown in the view:
- \snippet doc/src/snippets/declarative/qml-data-models/dynamic-listmodel.qml model
+ \snippet doc/src/snippets/qml/qml-data-models/dynamic-listmodel.qml model
\dots
- \snippet doc/src/snippets/declarative/qml-data-models/dynamic-listmodel.qml mouse area
+ \snippet doc/src/snippets/qml/qml-data-models/dynamic-listmodel.qml mouse area
When the MouseArea is clicked, \c fruitModel will have two roles, \i cost and \i name.
Even if subsequent roles are added, only the first two will be handled by views
@@ -253,7 +253,7 @@ To visualize data, bind the view's \c model property to a model and the
VisualItemModel provide the contents of the delegate. The model
does not provide any roles.
- \snippet doc/src/snippets/declarative/models/visual-model-and-view.qml visual model and view
+ \snippet doc/src/snippets/qml/models/visual-model-and-view.qml visual model and view
Note that in the above example there is no delegate required.
The items of the model itself provide the visual elements that
@@ -347,7 +347,7 @@ The following example shows a repeater used with a \l{#Grid}{Grid} item to
arrange a set of Rectangle items. The Repeater item creates a series of 24
rectangles for the Grid item to position in a 5 by 5 arrangement.
-\snippet doc/src/snippets/declarative/repeaters/repeater-grid-index.qml document
+\snippet doc/src/snippets/qml/repeaters/repeater-grid-index.qml document
The number of items created by a Repeater is held by its \l{Repeater::}{count}
property. It is not possible to set this property to determine the number of
diff --git a/doc/src/qtquick2/mouseevents.qdoc b/doc/src/qtquick2/mouseevents.qdoc
index d981c7c1dd..e452611416 100644
--- a/doc/src/qtquick2/mouseevents.qdoc
+++ b/doc/src/qtquick2/mouseevents.qdoc
@@ -55,7 +55,7 @@ to define this area is to anchor the \c MouseArea to its parent's area using the
component), then the MouseArea will fill the area defined by the parent's
dimensions. Alternatively, an area smaller or larger than the parent is
definable.
-\snippet doc/src/snippets/declarative/mousearea/mousearea-snippet.qml anchor fill
+\snippet doc/src/snippets/qml/mousearea/mousearea-snippet.qml anchor fill
\section1 Receiving Events
@@ -77,7 +77,7 @@ gestures in greater detail:
\endlist
These signals have signal handlers that are invoked when the signals are emitted.
-\snippet doc/src/snippets/declarative/mousearea/mousearea-snippet.qml mouse handlers
+\snippet doc/src/snippets/qml/mousearea/mousearea-snippet.qml mouse handlers
\section1 Enabling Gestures
Some mouse gestures and button clicks need to be enabled before they send or
@@ -95,7 +95,7 @@ positioning even when there are no mouse button presses. Setting the
\c hoverEnabled property to \c true, in turn will enable the \c entered,
\c exited, and \c positionChanged signal and their respective signal handlers.
-\snippet doc/src/snippets/declarative/mousearea/mousearea-snippet.qml enable handlers
+\snippet doc/src/snippets/qml/mousearea/mousearea-snippet.qml enable handlers
Additionally, to disable the whole mouse area, set the \c MouseArea
element's \c enabled property to \c false.
diff --git a/doc/src/qtquick2/positioners.qdoc b/doc/src/qtquick2/positioners.qdoc
index c7110f7cf9..55be7087fd 100644
--- a/doc/src/qtquick2/positioners.qdoc
+++ b/doc/src/qtquick2/positioners.qdoc
@@ -61,7 +61,7 @@ uses a Column item to arrange three \l Rectangle items in an area defined
by an outer \l Item. The \l{Column::spacing}{spacing} property is set to
include a small amount of space between the rectangles.
-\snippet doc/src/snippets/declarative/column/column.qml document
+\snippet doc/src/snippets/qml/column/column.qml document
Note that, since Column inherits directly from Item, any background color
must be added to a parent Rectangle, if desired.
@@ -80,7 +80,7 @@ include a small amount of space between the rectangles.
We ensure that the parent Rectangle is large enough so that there is some space
left around the edges of the horizontally centered Row item.
-\snippet doc/src/snippets/declarative/row.qml document
+\snippet doc/src/snippets/qml/row.qml document
\section2 Grid
@@ -93,7 +93,7 @@ The following example uses a Grid item to place four \l Rectangle items
in a 2-by-2 grid. As with the other positioners, the spacing between items
can be specified using the \l{Grid::spacing}{spacing} property.
-\snippet doc/src/snippets/declarative/grid-spacing.qml document
+\snippet doc/src/snippets/qml/grid-spacing.qml document
There is no difference between horizontal and vertical spacing inserted
between items, so any additional space must be added within the items
@@ -122,7 +122,7 @@ The following example shows a Flow item containing a number of \l Text
child items. These are arranged in a similar way to those shown in the
screenshots.
-\snippet doc/src/snippets/declarative/flow.qml document
+\snippet doc/src/snippets/qml/flow.qml document
The main differences between the Grid and Flow positioners are that items
inside a Flow will wrap when they run out of space on the minor axis, and
diff --git a/doc/src/qtquick2/qmltexthandling.qdoc b/doc/src/qtquick2/qmltexthandling.qdoc
index 876ab3c42f..6e6b2a4c6b 100644
--- a/doc/src/qtquick2/qmltexthandling.qdoc
+++ b/doc/src/qtquick2/qmltexthandling.qdoc
@@ -62,10 +62,10 @@ respective element documentation.
The \l {Validators}{validator} elements enforce the type and format of
\l TextInput objects.
-\snippet doc/src/snippets/declarative/texthandling.qml int validator
+\snippet doc/src/snippets/qml/texthandling.qml int validator
The validator elements bind to \c {TextInput}'s \c validator property.
-\snippet doc/src/snippets/declarative/texthandling.qml regexp validator
+\snippet doc/src/snippets/qml/texthandling.qml regexp validator
The regular expression in the snippet will only allow the inputted text to be
\c {fruit basket}.
diff --git a/doc/src/qtquick2/qtquick-intro.qdoc b/doc/src/qtquick2/qtquick-intro.qdoc
index 8aeab7e199..9eebb0bddc 100644
--- a/doc/src/qtquick2/qtquick-intro.qdoc
+++ b/doc/src/qtquick2/qtquick-intro.qdoc
@@ -34,7 +34,7 @@ create the kind of intuitive, modern, and fluid user interfaces that are
increasingly used on mobile phones, media players, set-top boxes, and other
portable devices. Qt Quick consists of a rich set of user interface
\l{QML Elements}{elements}, a \l{QML Syntax}{declarative} language for
-describing user interfaces, and a language \l{QtDeclarative Module}{runtime}. A
+describing user interfaces, and a language \l{QtQml Module}{runtime}. A
collection of C++ APIs is used to integrate these high level features with
classic Qt applications. Version 2.1 of the Qt Creator integrated development
environment (IDE) introduces tools for developing Qt Quick applications.
@@ -74,16 +74,16 @@ used to implement high level user interface logic.
\l{How to Learn QML} introduces the reader to the language and declarative
concepts.
-\section1 QtDeclarative Module
+\section1 QtQml Module
-To make Qt Quick possible, Qt introduces the \l{QtDeclarative} module. The
+To make Qt Quick possible, Qt introduces the \l{QtQml} module. The
module creates a JavaScript runtime that QML runs under with a Qt based backend.
-Because QtDeclarative and QML are built upon Qt, they inherit many of Qt's
+Because QtQml and QML are built upon Qt, they inherit many of Qt's
technology, namely the \l{Signals and Slots}{signals and slots} mechanism and
the \l{The Meta-Object System}{meta-object} system. Data created using C++ are
directly accessible from QML, and QML objects are also accessible from C++ code.
-The QtDeclarative module separates the interface logic in QML from the
+The QtQml module separates the interface logic in QML from the
application logic in C++. It also allows the range of standard QML elements
to be \l{Extending QML with C++}{extended with new ones written in C++}.
diff --git a/doc/src/qtquick2/qtquick2.qdoc b/doc/src/qtquick2/qtquick2.qdoc
index 6a1b7999c9..20361adb16 100644
--- a/doc/src/qtquick2/qtquick2.qdoc
+++ b/doc/src/qtquick2/qtquick2.qdoc
@@ -32,7 +32,7 @@
\brief The QML Elements
This QML module contains all the QML elements that are
- instantiated as objects of C++ classes in the QtDeclarative
+ instantiated as objects of C++ classes in the QtQml
module. These elements work with the Scenegraph renderer and
their own canvas.
*/
diff --git a/doc/src/qtquick2/righttoleft.qdoc b/doc/src/qtquick2/righttoleft.qdoc
index b2cff57ee0..1781e3582a 100644
--- a/doc/src/qtquick2/righttoleft.qdoc
+++ b/doc/src/qtquick2/righttoleft.qdoc
@@ -68,7 +68,7 @@ Note that when \l LayoutMirroring is set, the \c horizontalAlignment property va
the effective alignment of the text element that takes the mirroring into account can be read from the
\c effectiveHorizontalAlignment property.
-\snippet doc/src/snippets/declarative/righttoleft.qml 0
+\snippet doc/src/snippets/qml/righttoleft.qml 0
\section1 Layout direction of positioners and views
@@ -84,7 +84,7 @@ This causes the effective \c layoutDirection of positioners and views to be mirr
of the \c layoutDirection property will remain unchanged; the effective layout direction of positioners and
views that takes the mirroring into account can be read from the \c effectiveLayoutDirection property.
-\snippet doc/src/snippets/declarative/righttoleft.qml 1
+\snippet doc/src/snippets/qml/righttoleft.qml 1
\section1 Layout mirroring
@@ -95,11 +95,11 @@ support for existing left-to-right Qt Quick applications. It mirrors the behavio
You can enable layout mirroring for a particular \l Item:
-\snippet doc/src/snippets/declarative/righttoleft.qml 2
+\snippet doc/src/snippets/qml/righttoleft.qml 2
Or set all child elements to also inherit the layout direction:
-\snippet doc/src/snippets/declarative/righttoleft.qml 3
+\snippet doc/src/snippets/qml/righttoleft.qml 3
Applying mirroring in this manner does not change the actual value of the relevant anchor,
\c layoutDirection or \c horizontalAlignment properties. The separate read-only property
@@ -116,7 +116,7 @@ especially in views that rely on both the anchors and x coordinate-based positio
the \l LayoutMirroring attached property to apply mirroring to an item that is positioned using \l {Item::}{x}
coordinates:
-\snippet doc/src/snippets/declarative/righttoleft.qml 4
+\snippet doc/src/snippets/qml/righttoleft.qml 4
Not all layouts should necessarily be mirrored. There are cases where a visual element is positioned to
the right side of the screen for improved one-handed use, because most people are right-handed, and not
@@ -135,7 +135,7 @@ aligned and just make sure that text is translated and aligned properly.
Most images do not need to be mirrored, but some directional icons, such as arrows, may need to be mirrored.
The painting of these icons can be mirrored with a dedicated \c mirror property introduced in Qt Quick 1.1:
-\snippet doc/src/snippets/declarative/righttoleft.qml 5
+\snippet doc/src/snippets/qml/righttoleft.qml 5
\section1 Default layout direction
diff --git a/doc/src/qtquick2/states.qdoc b/doc/src/qtquick2/states.qdoc
index 559b4facac..622a1619b0 100644
--- a/doc/src/qtquick2/states.qdoc
+++ b/doc/src/qtquick2/states.qdoc
@@ -80,7 +80,7 @@ signal should be \c green and the warning \c flag is down. Meanwhile, in the
\c CRITICAL state, the \c color should be \c red and the flag is \c up. We may
model the states using the \c State element and the color and flag
configurations with the \c PropertyChanges element.
-\snippet doc/src/snippets/declarative/states.qml signal states
+\snippet doc/src/snippets/qml/states.qml signal states
The \l PropertyChanges element will change the values of object properties.
Objects are referenced through their \l {qml-id}{id}. Objects outside
the component are also referenced using the \c id property, exemplified by the
@@ -89,7 +89,7 @@ property change to the external \c flag object.
Further, the state may change by assigning the \c state property with the
appropriate signal state. A state switch could be in a \l MouseArea element,
assigning a different state whenever the signal receives a mouse click.
-\snippet doc/src/snippets/declarative/states.qml switch states
+\snippet doc/src/snippets/qml/states.qml switch states
The State element is not limited to performing modifications on property values.
It can also:
@@ -115,7 +115,7 @@ expressions to change the state whenever the bound expression evaluates to
\c true. The \c when property will revert the state back to the
\l {The Default State}{default state} when the expression evaluates to false.
-\snippet doc/src/snippets/declarative/states.qml when property
+\snippet doc/src/snippets/qml/states.qml when property
The \c bell component will change to the \c RINGING state whenever the
\c signal.state is \c CRITICAL.
diff --git a/doc/src/qtquick2/writingcomponents.qdoc b/doc/src/qtquick2/writingcomponents.qdoc
index 64d28eff0b..31267cf20c 100644
--- a/doc/src/qtquick2/writingcomponents.qdoc
+++ b/doc/src/qtquick2/writingcomponents.qdoc
@@ -55,14 +55,14 @@ For example, one of the simplest and most common components you can build in QML
button-type component. Below, we implement this component as a \l Rectangle with a clickable
\l MouseArea, in a file named \c Button.qml:
-\snippet doc/src/snippets/declarative/qml-extending-types/components/Button.qml 0
+\snippet doc/src/snippets/qml/qml-extending-types/components/Button.qml 0
Now this component can be reused by another file within the same directory. Since the file is
named \c Button.qml, the component is referred to as \c Button:
\table
\row
-\o \snippet doc/src/snippets/declarative/qml-extending-types/components/application.qml 0
+\o \snippet doc/src/snippets/qml/qml-extending-types/components/application.qml 0
\o \image qml-extending-types.png
\endtable
@@ -73,7 +73,7 @@ customize the \c width, \c height, \c radius and \c color properties of \c Butto
If \c Button.qml was not in the same directory, \c application.qml would need to load it as a
-\l {Modules}{module} from a specific filesystem path or \l{QDeclarativeExtensionPlugin}{plugin}.
+\l {Modules}{module} from a specific filesystem path or \l{QQmlExtensionPlugin}{plugin}.
Also, note the letter case of the component file name is significant on some (notably UNIX)
filesystems. It is recommended the file name case matches the case of the QML component name
exactly - for example, \c Box.qml and not \c BoX.qml - regardless of the platform to which the
@@ -119,8 +119,8 @@ an \c ImageViewer object and read or modify the \c currentImage value:
\table
\row
-\o \snippet doc/src/snippets/declarative/qml-extending-types/properties/ImageViewer.qml 0
-\o \snippet doc/src/snippets/declarative/qml-extending-types/properties/application.qml 0
+\o \snippet doc/src/snippets/qml/qml-extending-types/properties/ImageViewer.qml 0
+\o \snippet doc/src/snippets/qml/qml-extending-types/properties/application.qml 0
\endtable
It is optional for a property to have a default value. The default value is a convenient shortcut, and is
@@ -195,7 +195,7 @@ property name.
For example, the following \c onMyNumberChanged signal handler is automatically called whenever the
\c myNumber property changes:
-\snippet doc/src/snippets/declarative/qml-extending-types/properties/property-signals.qml 0
+\snippet doc/src/snippets/qml/qml-extending-types/properties/property-signals.qml 0
\section2 Default properties
@@ -266,7 +266,7 @@ declaring the alias, and, optionally, <property> refers to a property on that ob
For example, below is a \c Button.qml component with a \c buttonText aliased property which is
connected to the child Text object's \c text property:
-\snippet doc/src/snippets/declarative/qml-extending-types/properties/alias.qml 0
+\snippet doc/src/snippets/qml/qml-extending-types/properties/alias.qml 0
The following code would create a \c Button with a defined text string for the
child \l Text object:
@@ -290,8 +290,8 @@ been changed to an alias to the child \l Image object:
\table
\row
-\o \snippet doc/src/snippets/declarative/qml-extending-types/properties/alias/ImageViewer.qml 0
-\o \snippet doc/src/snippets/declarative/qml-extending-types/properties/alias/application.qml 0
+\o \snippet doc/src/snippets/qml/qml-extending-types/properties/alias/ImageViewer.qml 0
+\o \snippet doc/src/snippets/qml/qml-extending-types/properties/alias/application.qml 0
\endtable
Instead of being limited to setting the \l Image source, \c application.qml can now directly
@@ -335,7 +335,7 @@ It is possible for an aliased property to have the same name as an existing prop
the following component has a \c color alias property, named the same as the built-in
\l {Rectangle::color} property:
-\snippet doc/src/snippets/declarative/qml-extending-types/properties/alias-override.qml 0
+\snippet doc/src/snippets/qml/qml-extending-types/properties/alias-override.qml 0
Any objects that use this component and refer to its \c color property will be
referring to the alias rather than the ordinary \l {Rectangle::color} property. Internally,
@@ -366,7 +366,7 @@ the parameters by name.
Here is an example of a component with a \c say() method that accepts a single \c text argument:
-\snippet doc/src/snippets/declarative/qml-extending-types/methods/app.qml 0
+\snippet doc/src/snippets/qml/qml-extending-types/methods/app.qml 0
A method can be connected to a signal so that it is automatically invoked whenever the signal
is emitted. See \l {Connecting signals to methods and other signals} below.
@@ -422,8 +422,8 @@ signal is received by \c application.qml through an \c onButtonClicked signal ha
\table
\row
-\o \snippet doc/src/snippets/declarative/qml-extending-types/signals/basic.qml 0
-\o \snippet doc/src/snippets/declarative/qml-extending-types/signals/no-parameters.qml 0
+\o \snippet doc/src/snippets/qml/qml-extending-types/signals/basic.qml 0
+\o \snippet doc/src/snippets/qml/qml-extending-types/signals/no-parameters.qml 0
\endtable
If the signal has parameters, they are accessible by parameter name in the signal handler.
@@ -431,8 +431,8 @@ In the example below, \c buttonClicked is emitted with \c xPos and \c yPos param
\table
\row
-\o \snippet doc/src/snippets/declarative/qml-extending-types/signals/Button.qml 0
-\o \snippet doc/src/snippets/declarative/qml-extending-types/signals/parameters.qml 0
+\o \snippet doc/src/snippets/qml/qml-extending-types/signals/Button.qml 0
+\o \snippet doc/src/snippets/qml/qml-extending-types/signals/parameters.qml 0
\endtable
@@ -446,7 +446,7 @@ to be received by a method instead of a \l {Signal Handlers}{signal handler}.
For example, the \c application.qml above could be rewritten as:
-\snippet doc/src/snippets/declarative/qml-extending-types/signals/connectslots.qml 0
+\snippet doc/src/snippets/qml/qml-extending-types/signals/connectslots.qml 0
The \c myMethod() method will be called whenever the \c buttonClicked signal is received.
@@ -458,7 +458,7 @@ or \l {Integrating JavaScript}{integrating JavaScript code}, then you will find
objects dynamically, and connects the \c buttonClicked signal of each object to the
\c myMethod() function:
-\snippet doc/src/snippets/declarative/qml-extending-types/signals/connectdynamic.qml 0
+\snippet doc/src/snippets/qml/qml-extending-types/signals/connectdynamic.qml 0
In the same way, you could connect a signal to methods defined in a dynamically
created object, or \l {Receiving QML Signals in JavaScript}{connect a signal to a JavaScript method}.
diff --git a/doc/src/snippets/declarative/Button.qml b/doc/src/snippets/qml/Button.qml
index 0525ac1383..0525ac1383 100644
--- a/doc/src/snippets/declarative/Button.qml
+++ b/doc/src/snippets/qml/Button.qml
diff --git a/doc/src/snippets/declarative/SelfDestroyingRect.qml b/doc/src/snippets/qml/SelfDestroyingRect.qml
index baa4ab63a1..baa4ab63a1 100644
--- a/doc/src/snippets/declarative/SelfDestroyingRect.qml
+++ b/doc/src/snippets/qml/SelfDestroyingRect.qml
diff --git a/doc/src/snippets/declarative/Sprite.qml b/doc/src/snippets/qml/Sprite.qml
index ec08963be5..ec08963be5 100644
--- a/doc/src/snippets/declarative/Sprite.qml
+++ b/doc/src/snippets/qml/Sprite.qml
diff --git a/doc/src/snippets/declarative/anchoranimation.qml b/doc/src/snippets/qml/anchoranimation.qml
index 8f0603fab8..8f0603fab8 100644
--- a/doc/src/snippets/declarative/anchoranimation.qml
+++ b/doc/src/snippets/qml/anchoranimation.qml
diff --git a/doc/src/snippets/declarative/anchorchanges.qml b/doc/src/snippets/qml/anchorchanges.qml
index 9cc9d15221..9cc9d15221 100644
--- a/doc/src/snippets/declarative/anchorchanges.qml
+++ b/doc/src/snippets/qml/anchorchanges.qml
diff --git a/doc/src/snippets/declarative/animatedimage.qml b/doc/src/snippets/qml/animatedimage.qml
index a483619e11..a483619e11 100644
--- a/doc/src/snippets/declarative/animatedimage.qml
+++ b/doc/src/snippets/qml/animatedimage.qml
diff --git a/doc/src/snippets/declarative/animation.qml b/doc/src/snippets/qml/animation.qml
index d45ded397f..d45ded397f 100644
--- a/doc/src/snippets/declarative/animation.qml
+++ b/doc/src/snippets/qml/animation.qml
diff --git a/doc/src/snippets/declarative/application.qml b/doc/src/snippets/qml/application.qml
index 4e847176fa..4e847176fa 100644
--- a/doc/src/snippets/declarative/application.qml
+++ b/doc/src/snippets/qml/application.qml
diff --git a/doc/src/snippets/declarative/behavior.qml b/doc/src/snippets/qml/behavior.qml
index 4776e09a54..4776e09a54 100644
--- a/doc/src/snippets/declarative/behavior.qml
+++ b/doc/src/snippets/qml/behavior.qml
diff --git a/doc/src/snippets/declarative/borderimage/borderimage-scaled.qml b/doc/src/snippets/qml/borderimage/borderimage-scaled.qml
index 468aa24eab..468aa24eab 100644
--- a/doc/src/snippets/declarative/borderimage/borderimage-scaled.qml
+++ b/doc/src/snippets/qml/borderimage/borderimage-scaled.qml
diff --git a/doc/src/snippets/declarative/borderimage/borderimage-tiled.qml b/doc/src/snippets/qml/borderimage/borderimage-tiled.qml
index 69297378bf..69297378bf 100644
--- a/doc/src/snippets/declarative/borderimage/borderimage-tiled.qml
+++ b/doc/src/snippets/qml/borderimage/borderimage-tiled.qml
diff --git a/doc/src/snippets/declarative/borderimage/normal-image.qml b/doc/src/snippets/qml/borderimage/normal-image.qml
index 3bd34e3933..3bd34e3933 100644
--- a/doc/src/snippets/declarative/borderimage/normal-image.qml
+++ b/doc/src/snippets/qml/borderimage/normal-image.qml
diff --git a/doc/src/snippets/declarative/codingconventions/dotproperties.qml b/doc/src/snippets/qml/codingconventions/dotproperties.qml
index 75f4629b3e..75f4629b3e 100644
--- a/doc/src/snippets/declarative/codingconventions/dotproperties.qml
+++ b/doc/src/snippets/qml/codingconventions/dotproperties.qml
diff --git a/doc/src/snippets/declarative/codingconventions/javascript-imports.qml b/doc/src/snippets/qml/codingconventions/javascript-imports.qml
index 5ea66a9b1f..5ea66a9b1f 100644
--- a/doc/src/snippets/declarative/codingconventions/javascript-imports.qml
+++ b/doc/src/snippets/qml/codingconventions/javascript-imports.qml
diff --git a/doc/src/snippets/declarative/codingconventions/javascript.qml b/doc/src/snippets/qml/codingconventions/javascript.qml
index de3cc21493..de3cc21493 100644
--- a/doc/src/snippets/declarative/codingconventions/javascript.qml
+++ b/doc/src/snippets/qml/codingconventions/javascript.qml
diff --git a/doc/src/snippets/declarative/codingconventions/lists.qml b/doc/src/snippets/qml/codingconventions/lists.qml
index f99c92b08e..f99c92b08e 100644
--- a/doc/src/snippets/declarative/codingconventions/lists.qml
+++ b/doc/src/snippets/qml/codingconventions/lists.qml
diff --git a/doc/src/snippets/declarative/codingconventions/myscript.js b/doc/src/snippets/qml/codingconventions/myscript.js
index e7f83c259c..e7f83c259c 100644
--- a/doc/src/snippets/declarative/codingconventions/myscript.js
+++ b/doc/src/snippets/qml/codingconventions/myscript.js
diff --git a/doc/src/snippets/declarative/codingconventions/photo.qml b/doc/src/snippets/qml/codingconventions/photo.qml
index 1bd2811e9f..1bd2811e9f 100644
--- a/doc/src/snippets/declarative/codingconventions/photo.qml
+++ b/doc/src/snippets/qml/codingconventions/photo.qml
diff --git a/doc/src/snippets/declarative/codingconventions/private.qml b/doc/src/snippets/qml/codingconventions/private.qml
index 9aba1d0377..9aba1d0377 100644
--- a/doc/src/snippets/declarative/codingconventions/private.qml
+++ b/doc/src/snippets/qml/codingconventions/private.qml
diff --git a/doc/src/snippets/declarative/coloranimation.qml b/doc/src/snippets/qml/coloranimation.qml
index bb2d83bfb8..bb2d83bfb8 100644
--- a/doc/src/snippets/declarative/coloranimation.qml
+++ b/doc/src/snippets/qml/coloranimation.qml
diff --git a/doc/src/snippets/declarative/colors.qml b/doc/src/snippets/qml/colors.qml
index 7f94c6b843..7f94c6b843 100644
--- a/doc/src/snippets/declarative/colors.qml
+++ b/doc/src/snippets/qml/colors.qml
diff --git a/doc/src/snippets/declarative/column/column-transitions.qml b/doc/src/snippets/qml/column/column-transitions.qml
index 8e291b12c8..8e291b12c8 100644
--- a/doc/src/snippets/declarative/column/column-transitions.qml
+++ b/doc/src/snippets/qml/column/column-transitions.qml
diff --git a/doc/src/snippets/declarative/column/column.qml b/doc/src/snippets/qml/column/column.qml
index 3d51728d13..3d51728d13 100644
--- a/doc/src/snippets/declarative/column/column.qml
+++ b/doc/src/snippets/qml/column/column.qml
diff --git a/doc/src/snippets/declarative/column/vertical-positioner.qml b/doc/src/snippets/qml/column/vertical-positioner.qml
index 1661c46ba8..1661c46ba8 100644
--- a/doc/src/snippets/declarative/column/vertical-positioner.qml
+++ b/doc/src/snippets/qml/column/vertical-positioner.qml
diff --git a/doc/src/snippets/declarative/comments.qml b/doc/src/snippets/qml/comments.qml
index 8c3f0045b9..8c3f0045b9 100644
--- a/doc/src/snippets/declarative/comments.qml
+++ b/doc/src/snippets/qml/comments.qml
diff --git a/doc/src/snippets/declarative/component.qml b/doc/src/snippets/qml/component.qml
index e2a359e0e4..e2a359e0e4 100644
--- a/doc/src/snippets/declarative/component.qml
+++ b/doc/src/snippets/qml/component.qml
diff --git a/doc/src/snippets/declarative/componentCreation.js b/doc/src/snippets/qml/componentCreation.js
index 7364139d3d..7364139d3d 100644
--- a/doc/src/snippets/declarative/componentCreation.js
+++ b/doc/src/snippets/qml/componentCreation.js
diff --git a/doc/src/snippets/declarative/createComponent-simple.qml b/doc/src/snippets/qml/createComponent-simple.qml
index 3f90a39166..3f90a39166 100644
--- a/doc/src/snippets/declarative/createComponent-simple.qml
+++ b/doc/src/snippets/qml/createComponent-simple.qml
diff --git a/doc/src/snippets/declarative/createComponent.qml b/doc/src/snippets/qml/createComponent.qml
index e2d81170e4..e2d81170e4 100644
--- a/doc/src/snippets/declarative/createComponent.qml
+++ b/doc/src/snippets/qml/createComponent.qml
diff --git a/doc/src/snippets/declarative/createQmlObject.qml b/doc/src/snippets/qml/createQmlObject.qml
index 76cf836914..76cf836914 100644
--- a/doc/src/snippets/declarative/createQmlObject.qml
+++ b/doc/src/snippets/qml/createQmlObject.qml
diff --git a/doc/src/snippets/declarative/drag.qml b/doc/src/snippets/qml/drag.qml
index 286fcfc52b..286fcfc52b 100644
--- a/doc/src/snippets/declarative/drag.qml
+++ b/doc/src/snippets/qml/drag.qml
diff --git a/doc/src/snippets/declarative/dynamicObjects-destroy.qml b/doc/src/snippets/qml/dynamicObjects-destroy.qml
index 66fbc0b243..66fbc0b243 100644
--- a/doc/src/snippets/declarative/dynamicObjects-destroy.qml
+++ b/doc/src/snippets/qml/dynamicObjects-destroy.qml
diff --git a/doc/src/snippets/declarative/events.qml b/doc/src/snippets/qml/events.qml
index b9c5fef954..b9c5fef954 100644
--- a/doc/src/snippets/declarative/events.qml
+++ b/doc/src/snippets/qml/events.qml
diff --git a/doc/src/snippets/declarative/flickable.qml b/doc/src/snippets/qml/flickable.qml
index fda2615e14..fda2615e14 100644
--- a/doc/src/snippets/declarative/flickable.qml
+++ b/doc/src/snippets/qml/flickable.qml
diff --git a/doc/src/snippets/declarative/flickableScrollbar.qml b/doc/src/snippets/qml/flickableScrollbar.qml
index fd0aee3fc1..fd0aee3fc1 100644
--- a/doc/src/snippets/declarative/flickableScrollbar.qml
+++ b/doc/src/snippets/qml/flickableScrollbar.qml
diff --git a/doc/src/snippets/declarative/flipable/flipable.qml b/doc/src/snippets/qml/flipable/flipable.qml
index 4e451204d4..4e451204d4 100644
--- a/doc/src/snippets/declarative/flipable/flipable.qml
+++ b/doc/src/snippets/qml/flipable/flipable.qml
diff --git a/doc/src/snippets/declarative/flow.qml b/doc/src/snippets/qml/flow.qml
index 1141269986..1141269986 100644
--- a/doc/src/snippets/declarative/flow.qml
+++ b/doc/src/snippets/qml/flow.qml
diff --git a/doc/src/snippets/declarative/focus/MyClickableWidget.qml b/doc/src/snippets/qml/focus/MyClickableWidget.qml
index 7017f1bcb6..7017f1bcb6 100644
--- a/doc/src/snippets/declarative/focus/MyClickableWidget.qml
+++ b/doc/src/snippets/qml/focus/MyClickableWidget.qml
diff --git a/doc/src/snippets/declarative/focus/MyWidget.qml b/doc/src/snippets/qml/focus/MyWidget.qml
index 5899b18ae0..5899b18ae0 100644
--- a/doc/src/snippets/declarative/focus/MyWidget.qml
+++ b/doc/src/snippets/qml/focus/MyWidget.qml
diff --git a/doc/src/snippets/declarative/focus/advancedFocus.qml b/doc/src/snippets/qml/focus/advancedFocus.qml
index ec4efca450..ec4efca450 100644
--- a/doc/src/snippets/declarative/focus/advancedFocus.qml
+++ b/doc/src/snippets/qml/focus/advancedFocus.qml
diff --git a/doc/src/snippets/declarative/focus/basicwidget.qml b/doc/src/snippets/qml/focus/basicwidget.qml
index bd5778948a..bd5778948a 100644
--- a/doc/src/snippets/declarative/focus/basicwidget.qml
+++ b/doc/src/snippets/qml/focus/basicwidget.qml
diff --git a/doc/src/snippets/declarative/focus/clickablewidget.qml b/doc/src/snippets/qml/focus/clickablewidget.qml
index 81bd5f7e51..81bd5f7e51 100644
--- a/doc/src/snippets/declarative/focus/clickablewidget.qml
+++ b/doc/src/snippets/qml/focus/clickablewidget.qml
diff --git a/doc/src/snippets/declarative/focus/myfocusscopewidget.qml b/doc/src/snippets/qml/focus/myfocusscopewidget.qml
index f568c39a32..f568c39a32 100644
--- a/doc/src/snippets/declarative/focus/myfocusscopewidget.qml
+++ b/doc/src/snippets/qml/focus/myfocusscopewidget.qml
diff --git a/doc/src/snippets/declarative/focus/rectangle.qml b/doc/src/snippets/qml/focus/rectangle.qml
index cb00f1f11a..cb00f1f11a 100644
--- a/doc/src/snippets/declarative/focus/rectangle.qml
+++ b/doc/src/snippets/qml/focus/rectangle.qml
diff --git a/doc/src/snippets/declarative/focus/widget.qml b/doc/src/snippets/qml/focus/widget.qml
index 5ee8a71846..5ee8a71846 100644
--- a/doc/src/snippets/declarative/focus/widget.qml
+++ b/doc/src/snippets/qml/focus/widget.qml
diff --git a/doc/src/snippets/declarative/folderlistmodel.qml b/doc/src/snippets/qml/folderlistmodel.qml
index 5878640567..5878640567 100644
--- a/doc/src/snippets/declarative/folderlistmodel.qml
+++ b/doc/src/snippets/qml/folderlistmodel.qml
diff --git a/doc/src/snippets/declarative/gradient.qml b/doc/src/snippets/qml/gradient.qml
index a5af6a7930..a5af6a7930 100644
--- a/doc/src/snippets/declarative/gradient.qml
+++ b/doc/src/snippets/qml/gradient.qml
diff --git a/doc/src/snippets/declarative/grid-spacing.qml b/doc/src/snippets/qml/grid-spacing.qml
index 1385492ac6..1385492ac6 100644
--- a/doc/src/snippets/declarative/grid-spacing.qml
+++ b/doc/src/snippets/qml/grid-spacing.qml
diff --git a/doc/src/snippets/declarative/grid/grid-items.qml b/doc/src/snippets/qml/grid/grid-items.qml
index 8afb170f75..8afb170f75 100644
--- a/doc/src/snippets/declarative/grid/grid-items.qml
+++ b/doc/src/snippets/qml/grid/grid-items.qml
diff --git a/doc/src/snippets/declarative/grid/grid-no-spacing.qml b/doc/src/snippets/qml/grid/grid-no-spacing.qml
index c44eadce63..c44eadce63 100644
--- a/doc/src/snippets/declarative/grid/grid-no-spacing.qml
+++ b/doc/src/snippets/qml/grid/grid-no-spacing.qml
diff --git a/doc/src/snippets/declarative/grid/grid-spacing.qml b/doc/src/snippets/qml/grid/grid-spacing.qml
index 1385492ac6..1385492ac6 100644
--- a/doc/src/snippets/declarative/grid/grid-spacing.qml
+++ b/doc/src/snippets/qml/grid/grid-spacing.qml
diff --git a/doc/src/snippets/declarative/grid/grid.qml b/doc/src/snippets/qml/grid/grid.qml
index 7fb1bb6f5a..7fb1bb6f5a 100644
--- a/doc/src/snippets/declarative/grid/grid.qml
+++ b/doc/src/snippets/qml/grid/grid.qml
diff --git a/doc/src/snippets/declarative/gridview/ContactModel.qml b/doc/src/snippets/qml/gridview/ContactModel.qml
index f744c1e73f..f744c1e73f 100644
--- a/doc/src/snippets/declarative/gridview/ContactModel.qml
+++ b/doc/src/snippets/qml/gridview/ContactModel.qml
diff --git a/doc/src/snippets/declarative/gridview/gridview.qml b/doc/src/snippets/qml/gridview/gridview.qml
index d3b37d1338..d3b37d1338 100644
--- a/doc/src/snippets/declarative/gridview/gridview.qml
+++ b/doc/src/snippets/qml/gridview/gridview.qml
diff --git a/doc/src/snippets/declarative/image.qml b/doc/src/snippets/qml/image.qml
index 61724ffeea..61724ffeea 100644
--- a/doc/src/snippets/declarative/image.qml
+++ b/doc/src/snippets/qml/image.qml
diff --git a/doc/src/snippets/declarative/imports/chart.qml b/doc/src/snippets/qml/imports/chart.qml
index d5a2d3bf45..d5a2d3bf45 100644
--- a/doc/src/snippets/declarative/imports/chart.qml
+++ b/doc/src/snippets/qml/imports/chart.qml
diff --git a/doc/src/snippets/declarative/imports/installed-module.qml b/doc/src/snippets/qml/imports/installed-module.qml
index c263ea89ed..c263ea89ed 100644
--- a/doc/src/snippets/declarative/imports/installed-module.qml
+++ b/doc/src/snippets/qml/imports/installed-module.qml
diff --git a/doc/src/snippets/declarative/imports/merged-named-imports.qml b/doc/src/snippets/qml/imports/merged-named-imports.qml
index a75687c740..a75687c740 100644
--- a/doc/src/snippets/declarative/imports/merged-named-imports.qml
+++ b/doc/src/snippets/qml/imports/merged-named-imports.qml
diff --git a/doc/src/snippets/declarative/imports/named-imports.qml b/doc/src/snippets/qml/imports/named-imports.qml
index 125e6cfa27..125e6cfa27 100644
--- a/doc/src/snippets/declarative/imports/named-imports.qml
+++ b/doc/src/snippets/qml/imports/named-imports.qml
diff --git a/doc/src/snippets/declarative/imports/network-imports.qml b/doc/src/snippets/qml/imports/network-imports.qml
index f039c44f1e..f039c44f1e 100644
--- a/doc/src/snippets/declarative/imports/network-imports.qml
+++ b/doc/src/snippets/qml/imports/network-imports.qml
diff --git a/doc/src/snippets/declarative/imports/qtquick-1.0.qml b/doc/src/snippets/qml/imports/qtquick-1.0.qml
index 481bc12e7e..481bc12e7e 100644
--- a/doc/src/snippets/declarative/imports/qtquick-1.0.qml
+++ b/doc/src/snippets/qml/imports/qtquick-1.0.qml
diff --git a/doc/src/snippets/declarative/imports/timeexample.qml b/doc/src/snippets/qml/imports/timeexample.qml
index 4d79dbe15e..4d79dbe15e 100644
--- a/doc/src/snippets/declarative/imports/timeexample.qml
+++ b/doc/src/snippets/qml/imports/timeexample.qml
diff --git a/doc/src/snippets/declarative/integrating-javascript/connectjs.qml b/doc/src/snippets/qml/integrating-javascript/connectjs.qml
index 89c9ebc21a..89c9ebc21a 100644
--- a/doc/src/snippets/declarative/integrating-javascript/connectjs.qml
+++ b/doc/src/snippets/qml/integrating-javascript/connectjs.qml
diff --git a/doc/src/snippets/declarative/integrating-javascript/includejs/app.qml b/doc/src/snippets/qml/integrating-javascript/includejs/app.qml
index 0dd7b533a6..0dd7b533a6 100644
--- a/doc/src/snippets/declarative/integrating-javascript/includejs/app.qml
+++ b/doc/src/snippets/qml/integrating-javascript/includejs/app.qml
diff --git a/doc/src/snippets/declarative/integrating-javascript/includejs/factorial.js b/doc/src/snippets/qml/integrating-javascript/includejs/factorial.js
index a7bc4ac69f..a7bc4ac69f 100644
--- a/doc/src/snippets/declarative/integrating-javascript/includejs/factorial.js
+++ b/doc/src/snippets/qml/integrating-javascript/includejs/factorial.js
diff --git a/doc/src/snippets/declarative/integrating-javascript/includejs/script.js b/doc/src/snippets/qml/integrating-javascript/includejs/script.js
index 964b2f5e8a..964b2f5e8a 100644
--- a/doc/src/snippets/declarative/integrating-javascript/includejs/script.js
+++ b/doc/src/snippets/qml/integrating-javascript/includejs/script.js
diff --git a/doc/src/snippets/declarative/integrating-javascript/scarceresources/avatarExample.cpp b/doc/src/snippets/qml/integrating-javascript/scarceresources/avatarExample.cpp
index 8825cca4bb..e018a68292 100644
--- a/doc/src/snippets/declarative/integrating-javascript/scarceresources/avatarExample.cpp
+++ b/doc/src/snippets/qml/integrating-javascript/scarceresources/avatarExample.cpp
@@ -39,8 +39,8 @@
****************************************************************************/
#include "avatarExample.h"
-#include <QDeclarativeEngine>
-#include <QDeclarativeComponent>
+#include <QQmlEngine>
+#include <QQmlComponent>
void registerTypes()
{
@@ -52,7 +52,7 @@ void registerTypes()
void expectOne()
{
//![1]
-QDeclarativeComponent component(&engine, "exampleOne.qml");
+QQmlComponent component(&engine, "exampleOne.qml");
QObject *object = component.create();
// The scarce resource will have been released automatically
// by this point, after the binding expression was evaluated.
@@ -63,7 +63,7 @@ delete object;
void expectTwo()
{
//![2]
-QDeclarativeComponent component(&engine, "exampleTwo.qml");
+QQmlComponent component(&engine, "exampleTwo.qml");
QObject *object = component.create();
// The scarce resource will not have been released automatically
// after the binding expression was evaluated.
@@ -77,7 +77,7 @@ delete object;
void expectThree()
{
//![3]
-QDeclarativeComponent component(&engine, "exampleThree.qml");
+QQmlComponent component(&engine, "exampleThree.qml");
QObject *object = component.create();
// The resource was preserved explicitly during evaluation of the
// JavaScript expression. Thus, during property assignment, the
@@ -92,7 +92,7 @@ delete object;
void expectFour()
{
//![4]
-QDeclarativeComponent component(&engine, "exampleFour.qml");
+QQmlComponent component(&engine, "exampleFour.qml");
QObject *object = component.create();
// The scarce resource was explicitly preserved by the client during
// the importAvatar() function, and so the scarce resource
@@ -111,7 +111,7 @@ delete object;
void expectFive()
{
//![5]
-QDeclarativeComponent component(&engine, "exampleFive.qml");
+QQmlComponent component(&engine, "exampleFive.qml");
QObject *object = component.create();
// We have the expected results:
bool expectedResultOne = (object->property("avatarOne").isValid() == false);
diff --git a/doc/src/snippets/declarative/integrating-javascript/scarceresources/avatarExample.h b/doc/src/snippets/qml/integrating-javascript/scarceresources/avatarExample.h
index d9fbff4fde..d9fbff4fde 100644
--- a/doc/src/snippets/declarative/integrating-javascript/scarceresources/avatarExample.h
+++ b/doc/src/snippets/qml/integrating-javascript/scarceresources/avatarExample.h
diff --git a/doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleFive.qml b/doc/src/snippets/qml/integrating-javascript/scarceresources/exampleFive.qml
index 7cfab16a51..7cfab16a51 100644
--- a/doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleFive.qml
+++ b/doc/src/snippets/qml/integrating-javascript/scarceresources/exampleFive.qml
diff --git a/doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleFour.js b/doc/src/snippets/qml/integrating-javascript/scarceresources/exampleFour.js
index d104e6f6c7..d104e6f6c7 100644
--- a/doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleFour.js
+++ b/doc/src/snippets/qml/integrating-javascript/scarceresources/exampleFour.js
diff --git a/doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleFour.qml b/doc/src/snippets/qml/integrating-javascript/scarceresources/exampleFour.qml
index f5811602dc..f5811602dc 100644
--- a/doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleFour.qml
+++ b/doc/src/snippets/qml/integrating-javascript/scarceresources/exampleFour.qml
diff --git a/doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleOne.qml b/doc/src/snippets/qml/integrating-javascript/scarceresources/exampleOne.qml
index cf9b3ebc5d..cf9b3ebc5d 100644
--- a/doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleOne.qml
+++ b/doc/src/snippets/qml/integrating-javascript/scarceresources/exampleOne.qml
diff --git a/doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleThree.js b/doc/src/snippets/qml/integrating-javascript/scarceresources/exampleThree.js
index 44df13f7a4..44df13f7a4 100644
--- a/doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleThree.js
+++ b/doc/src/snippets/qml/integrating-javascript/scarceresources/exampleThree.js
diff --git a/doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleThree.qml b/doc/src/snippets/qml/integrating-javascript/scarceresources/exampleThree.qml
index 3f12458cec..3f12458cec 100644
--- a/doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleThree.qml
+++ b/doc/src/snippets/qml/integrating-javascript/scarceresources/exampleThree.qml
diff --git a/doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleTwo.qml b/doc/src/snippets/qml/integrating-javascript/scarceresources/exampleTwo.qml
index f322fb9ed9..f322fb9ed9 100644
--- a/doc/src/snippets/declarative/integrating-javascript/scarceresources/exampleTwo.qml
+++ b/doc/src/snippets/qml/integrating-javascript/scarceresources/exampleTwo.qml
diff --git a/doc/src/snippets/declarative/integrating-javascript/script.js b/doc/src/snippets/qml/integrating-javascript/script.js
index 006cf1aead..006cf1aead 100644
--- a/doc/src/snippets/declarative/integrating-javascript/script.js
+++ b/doc/src/snippets/qml/integrating-javascript/script.js
diff --git a/doc/src/snippets/declarative/keynavigation.qml b/doc/src/snippets/qml/keynavigation.qml
index 4854ecd0ed..4854ecd0ed 100644
--- a/doc/src/snippets/declarative/keynavigation.qml
+++ b/doc/src/snippets/qml/keynavigation.qml
diff --git a/doc/src/snippets/declarative/keys/keys-handler.qml b/doc/src/snippets/qml/keys/keys-handler.qml
index 21fc98e23d..21fc98e23d 100644
--- a/doc/src/snippets/declarative/keys/keys-handler.qml
+++ b/doc/src/snippets/qml/keys/keys-handler.qml
diff --git a/doc/src/snippets/declarative/keys/keys-pressed.qml b/doc/src/snippets/qml/keys/keys-pressed.qml
index 3c9a2d9dce..3c9a2d9dce 100644
--- a/doc/src/snippets/declarative/keys/keys-pressed.qml
+++ b/doc/src/snippets/qml/keys/keys-pressed.qml
diff --git a/doc/src/snippets/declarative/layoutmirroring.qml b/doc/src/snippets/qml/layoutmirroring.qml
index 5daf3f58b3..5daf3f58b3 100644
--- a/doc/src/snippets/declarative/layoutmirroring.qml
+++ b/doc/src/snippets/qml/layoutmirroring.qml
diff --git a/doc/src/snippets/declarative/listmodel-modify.qml b/doc/src/snippets/qml/listmodel-modify.qml
index 308453b393..308453b393 100644
--- a/doc/src/snippets/declarative/listmodel-modify.qml
+++ b/doc/src/snippets/qml/listmodel-modify.qml
diff --git a/doc/src/snippets/declarative/listmodel-nested.qml b/doc/src/snippets/qml/listmodel-nested.qml
index bac95608e1..bac95608e1 100644
--- a/doc/src/snippets/declarative/listmodel-nested.qml
+++ b/doc/src/snippets/qml/listmodel-nested.qml
diff --git a/doc/src/snippets/declarative/listmodel-simple.qml b/doc/src/snippets/qml/listmodel-simple.qml
index e8c4cea68e..e8c4cea68e 100644
--- a/doc/src/snippets/declarative/listmodel-simple.qml
+++ b/doc/src/snippets/qml/listmodel-simple.qml
diff --git a/doc/src/snippets/declarative/listmodel.qml b/doc/src/snippets/qml/listmodel.qml
index e93732e2ee..e93732e2ee 100644
--- a/doc/src/snippets/declarative/listmodel.qml
+++ b/doc/src/snippets/qml/listmodel.qml
diff --git a/doc/src/snippets/declarative/listview-decorations.qml b/doc/src/snippets/qml/listview-decorations.qml
index ccd7023d9c..ccd7023d9c 100644
--- a/doc/src/snippets/declarative/listview-decorations.qml
+++ b/doc/src/snippets/qml/listview-decorations.qml
diff --git a/doc/src/snippets/declarative/listview-sections.qml b/doc/src/snippets/qml/listview-sections.qml
index 59cfdf80bb..59cfdf80bb 100644
--- a/doc/src/snippets/declarative/listview-sections.qml
+++ b/doc/src/snippets/qml/listview-sections.qml
diff --git a/doc/src/snippets/declarative/listview.qml b/doc/src/snippets/qml/listview.qml
index e8752a47cd..e8752a47cd 100644
--- a/doc/src/snippets/declarative/listview.qml
+++ b/doc/src/snippets/qml/listview.qml
diff --git a/doc/src/snippets/declarative/listview/ContactModel.qml b/doc/src/snippets/qml/listview/ContactModel.qml
index 395c637b6a..395c637b6a 100644
--- a/doc/src/snippets/declarative/listview/ContactModel.qml
+++ b/doc/src/snippets/qml/listview/ContactModel.qml
diff --git a/doc/src/snippets/declarative/listview/listview-snippet.qml b/doc/src/snippets/qml/listview/listview-snippet.qml
index 1458e9aa50..1458e9aa50 100644
--- a/doc/src/snippets/declarative/listview/listview-snippet.qml
+++ b/doc/src/snippets/qml/listview/listview-snippet.qml
diff --git a/doc/src/snippets/declarative/listview/listview.qml b/doc/src/snippets/qml/listview/listview.qml
index 689e6d2c45..689e6d2c45 100644
--- a/doc/src/snippets/declarative/listview/listview.qml
+++ b/doc/src/snippets/qml/listview/listview.qml
diff --git a/doc/src/snippets/declarative/loader/KeyReader.qml b/doc/src/snippets/qml/loader/KeyReader.qml
index ef15a01bb1..ef15a01bb1 100644
--- a/doc/src/snippets/declarative/loader/KeyReader.qml
+++ b/doc/src/snippets/qml/loader/KeyReader.qml
diff --git a/doc/src/snippets/declarative/loader/MyItem.qml b/doc/src/snippets/qml/loader/MyItem.qml
index 2879e7ae23..2879e7ae23 100644
--- a/doc/src/snippets/declarative/loader/MyItem.qml
+++ b/doc/src/snippets/qml/loader/MyItem.qml
diff --git a/doc/src/snippets/declarative/loader/connections.qml b/doc/src/snippets/qml/loader/connections.qml
index 82d770b2cb..82d770b2cb 100644
--- a/doc/src/snippets/declarative/loader/connections.qml
+++ b/doc/src/snippets/qml/loader/connections.qml
diff --git a/doc/src/snippets/declarative/loader/focus.qml b/doc/src/snippets/qml/loader/focus.qml
index 4447c62905..4447c62905 100644
--- a/doc/src/snippets/declarative/loader/focus.qml
+++ b/doc/src/snippets/qml/loader/focus.qml
diff --git a/doc/src/snippets/declarative/loader/simple.qml b/doc/src/snippets/qml/loader/simple.qml
index a4408c2231..a4408c2231 100644
--- a/doc/src/snippets/declarative/loader/simple.qml
+++ b/doc/src/snippets/qml/loader/simple.qml
diff --git a/doc/src/snippets/declarative/loader/sizeitem.qml b/doc/src/snippets/qml/loader/sizeitem.qml
index d673d82817..d673d82817 100644
--- a/doc/src/snippets/declarative/loader/sizeitem.qml
+++ b/doc/src/snippets/qml/loader/sizeitem.qml
diff --git a/doc/src/snippets/declarative/loader/sizeloader.qml b/doc/src/snippets/qml/loader/sizeloader.qml
index 551324598c..551324598c 100644
--- a/doc/src/snippets/declarative/loader/sizeloader.qml
+++ b/doc/src/snippets/qml/loader/sizeloader.qml
diff --git a/doc/src/snippets/declarative/models/views-models-delegates.qml b/doc/src/snippets/qml/models/views-models-delegates.qml
index e9f872578f..e9f872578f 100644
--- a/doc/src/snippets/declarative/models/views-models-delegates.qml
+++ b/doc/src/snippets/qml/models/views-models-delegates.qml
diff --git a/doc/src/snippets/declarative/models/visual-model-and-view.qml b/doc/src/snippets/qml/models/visual-model-and-view.qml
index 97e443b675..97e443b675 100644
--- a/doc/src/snippets/declarative/models/visual-model-and-view.qml
+++ b/doc/src/snippets/qml/models/visual-model-and-view.qml
diff --git a/doc/src/snippets/declarative/mousearea/mousearea-snippet.qml b/doc/src/snippets/qml/mousearea/mousearea-snippet.qml
index 237c0c31b0..237c0c31b0 100644
--- a/doc/src/snippets/declarative/mousearea/mousearea-snippet.qml
+++ b/doc/src/snippets/qml/mousearea/mousearea-snippet.qml
diff --git a/doc/src/snippets/declarative/mousearea/mousearea.qml b/doc/src/snippets/qml/mousearea/mousearea.qml
index 1f35cd8b5f..1f35cd8b5f 100644
--- a/doc/src/snippets/declarative/mousearea/mousearea.qml
+++ b/doc/src/snippets/qml/mousearea/mousearea.qml
diff --git a/doc/src/snippets/declarative/mousearea/mouseareadragfilter.qml b/doc/src/snippets/qml/mousearea/mouseareadragfilter.qml
index 922bfea636..922bfea636 100644
--- a/doc/src/snippets/declarative/mousearea/mouseareadragfilter.qml
+++ b/doc/src/snippets/qml/mousearea/mouseareadragfilter.qml
diff --git a/doc/src/snippets/declarative/multipointtoucharea/multipointtoucharea.qml b/doc/src/snippets/qml/multipointtoucharea/multipointtoucharea.qml
index e4c2ffb039..e4c2ffb039 100644
--- a/doc/src/snippets/declarative/multipointtoucharea/multipointtoucharea.qml
+++ b/doc/src/snippets/qml/multipointtoucharea/multipointtoucharea.qml
diff --git a/doc/src/snippets/declarative/numberanimation.qml b/doc/src/snippets/qml/numberanimation.qml
index 404381863d..404381863d 100644
--- a/doc/src/snippets/declarative/numberanimation.qml
+++ b/doc/src/snippets/qml/numberanimation.qml
diff --git a/doc/src/snippets/declarative/parallelanimation.qml b/doc/src/snippets/qml/parallelanimation.qml
index 20f6ccc1df..20f6ccc1df 100644
--- a/doc/src/snippets/declarative/parallelanimation.qml
+++ b/doc/src/snippets/qml/parallelanimation.qml
diff --git a/doc/src/snippets/declarative/parentanimation.qml b/doc/src/snippets/qml/parentanimation.qml
index 60429ed61c..60429ed61c 100644
--- a/doc/src/snippets/declarative/parentanimation.qml
+++ b/doc/src/snippets/qml/parentanimation.qml
diff --git a/doc/src/snippets/declarative/parentchange.qml b/doc/src/snippets/qml/parentchange.qml
index 4ae4476e13..4ae4476e13 100644
--- a/doc/src/snippets/declarative/parentchange.qml
+++ b/doc/src/snippets/qml/parentchange.qml
diff --git a/doc/src/snippets/declarative/path/arcdirection.qml b/doc/src/snippets/qml/path/arcdirection.qml
index 7522649607..7522649607 100644
--- a/doc/src/snippets/declarative/path/arcdirection.qml
+++ b/doc/src/snippets/qml/path/arcdirection.qml
diff --git a/doc/src/snippets/declarative/path/arcradius.qml b/doc/src/snippets/qml/path/arcradius.qml
index 04f2919270..04f2919270 100644
--- a/doc/src/snippets/declarative/path/arcradius.qml
+++ b/doc/src/snippets/qml/path/arcradius.qml
diff --git a/doc/src/snippets/declarative/path/basicarc.qml b/doc/src/snippets/qml/path/basicarc.qml
index 562f2a0adf..562f2a0adf 100644
--- a/doc/src/snippets/declarative/path/basicarc.qml
+++ b/doc/src/snippets/qml/path/basicarc.qml
diff --git a/doc/src/snippets/declarative/path/basiccurve.qml b/doc/src/snippets/qml/path/basiccurve.qml
index feb783cb01..feb783cb01 100644
--- a/doc/src/snippets/declarative/path/basiccurve.qml
+++ b/doc/src/snippets/qml/path/basiccurve.qml
diff --git a/doc/src/snippets/declarative/path/largearc.qml b/doc/src/snippets/qml/path/largearc.qml
index 69ce953c92..69ce953c92 100644
--- a/doc/src/snippets/declarative/path/largearc.qml
+++ b/doc/src/snippets/qml/path/largearc.qml
diff --git a/doc/src/snippets/declarative/pathinterpolator.qml b/doc/src/snippets/qml/pathinterpolator.qml
index 77cc664e27..77cc664e27 100644
--- a/doc/src/snippets/declarative/pathinterpolator.qml
+++ b/doc/src/snippets/qml/pathinterpolator.qml
diff --git a/doc/src/snippets/declarative/pathview/ContactModel.qml b/doc/src/snippets/qml/pathview/ContactModel.qml
index d191413f27..d191413f27 100644
--- a/doc/src/snippets/declarative/pathview/ContactModel.qml
+++ b/doc/src/snippets/qml/pathview/ContactModel.qml
diff --git a/doc/src/snippets/declarative/pathview/pathattributes.qml b/doc/src/snippets/qml/pathview/pathattributes.qml
index d555998650..d555998650 100644
--- a/doc/src/snippets/declarative/pathview/pathattributes.qml
+++ b/doc/src/snippets/qml/pathview/pathattributes.qml
diff --git a/doc/src/snippets/declarative/pathview/pathview.qml b/doc/src/snippets/qml/pathview/pathview.qml
index e5249d4cb6..e5249d4cb6 100644
--- a/doc/src/snippets/declarative/pathview/pathview.qml
+++ b/doc/src/snippets/qml/pathview/pathview.qml
diff --git a/doc/src/snippets/declarative/properties.qml b/doc/src/snippets/qml/properties.qml
index 21894b68e0..21894b68e0 100644
--- a/doc/src/snippets/declarative/properties.qml
+++ b/doc/src/snippets/qml/properties.qml
diff --git a/doc/src/snippets/declarative/propertyaction-sequential.qml b/doc/src/snippets/qml/propertyaction-sequential.qml
index 77d6ec194e..77d6ec194e 100644
--- a/doc/src/snippets/declarative/propertyaction-sequential.qml
+++ b/doc/src/snippets/qml/propertyaction-sequential.qml
diff --git a/doc/src/snippets/declarative/propertyaction.qml b/doc/src/snippets/qml/propertyaction.qml
index 5ddef30177..5ddef30177 100644
--- a/doc/src/snippets/declarative/propertyaction.qml
+++ b/doc/src/snippets/qml/propertyaction.qml
diff --git a/doc/src/snippets/declarative/propertyanimation.qml b/doc/src/snippets/qml/propertyanimation.qml
index b5781af94a..b5781af94a 100644
--- a/doc/src/snippets/declarative/propertyanimation.qml
+++ b/doc/src/snippets/qml/propertyanimation.qml
diff --git a/doc/src/snippets/declarative/propertychanges.qml b/doc/src/snippets/qml/propertychanges.qml
index 3be13f7861..3be13f7861 100644
--- a/doc/src/snippets/declarative/propertychanges.qml
+++ b/doc/src/snippets/qml/propertychanges.qml
diff --git a/doc/src/snippets/declarative/qml-data-models/dynamic-listmodel.qml b/doc/src/snippets/qml/qml-data-models/dynamic-listmodel.qml
index da9610c117..da9610c117 100644
--- a/doc/src/snippets/declarative/qml-data-models/dynamic-listmodel.qml
+++ b/doc/src/snippets/qml/qml-data-models/dynamic-listmodel.qml
diff --git a/doc/src/snippets/declarative/qml-data-models/listelements.qml b/doc/src/snippets/qml/qml-data-models/listelements.qml
index 0097423142..0097423142 100644
--- a/doc/src/snippets/declarative/qml-data-models/listelements.qml
+++ b/doc/src/snippets/qml/qml-data-models/listelements.qml
diff --git a/doc/src/snippets/declarative/qml-data-models/listmodel-listview.qml b/doc/src/snippets/qml/qml-data-models/listmodel-listview.qml
index 406fada2ce..406fada2ce 100644
--- a/doc/src/snippets/declarative/qml-data-models/listmodel-listview.qml
+++ b/doc/src/snippets/qml/qml-data-models/listmodel-listview.qml
diff --git a/doc/src/snippets/declarative/qml-documents/inline-component.qml b/doc/src/snippets/qml/qml-documents/inline-component.qml
index 7e01ca369b..7e01ca369b 100644
--- a/doc/src/snippets/declarative/qml-documents/inline-component.qml
+++ b/doc/src/snippets/qml/qml-documents/inline-component.qml
diff --git a/doc/src/snippets/declarative/qml-documents/inline-text-component.qml b/doc/src/snippets/qml/qml-documents/inline-text-component.qml
index 2405585b43..2405585b43 100644
--- a/doc/src/snippets/declarative/qml-documents/inline-text-component.qml
+++ b/doc/src/snippets/qml/qml-documents/inline-text-component.qml
diff --git a/doc/src/snippets/declarative/qml-documents/non-trivial.qml b/doc/src/snippets/qml/qml-documents/non-trivial.qml
index bd1b94a3cc..bd1b94a3cc 100644
--- a/doc/src/snippets/declarative/qml-documents/non-trivial.qml
+++ b/doc/src/snippets/qml/qml-documents/non-trivial.qml
diff --git a/doc/src/snippets/declarative/qml-documents/qmldocuments.qml b/doc/src/snippets/qml/qml-documents/qmldocuments.qml
index cf60741f0c..cf60741f0c 100644
--- a/doc/src/snippets/declarative/qml-documents/qmldocuments.qml
+++ b/doc/src/snippets/qml/qml-documents/qmldocuments.qml
diff --git a/doc/src/snippets/declarative/qml-intro/images/qt-logo.svg b/doc/src/snippets/qml/qml-intro/images/qt-logo.svg
index 8c018be6a2..8c018be6a2 100644
--- a/doc/src/snippets/declarative/qml-intro/images/qt-logo.svg
+++ b/doc/src/snippets/qml/qml-intro/images/qt-logo.svg
diff --git a/doc/src/snippets/declarative/qtbinding/context-advanced/MyItem.qml b/doc/src/snippets/qml/qtbinding/context-advanced/MyItem.qml
index a9b873d4b0..a9b873d4b0 100644
--- a/doc/src/snippets/declarative/qtbinding/context-advanced/MyItem.qml
+++ b/doc/src/snippets/qml/qtbinding/context-advanced/MyItem.qml
diff --git a/doc/src/snippets/declarative/qtbinding/context-advanced/applicationdata.h b/doc/src/snippets/qml/qtbinding/context-advanced/applicationdata.h
index fc5bbc6400..fc5bbc6400 100644
--- a/doc/src/snippets/declarative/qtbinding/context-advanced/applicationdata.h
+++ b/doc/src/snippets/qml/qtbinding/context-advanced/applicationdata.h
diff --git a/doc/src/snippets/declarative/qtbinding/context-advanced/connections.qml b/doc/src/snippets/qml/qtbinding/context-advanced/connections.qml
index 01f0cdefb9..01f0cdefb9 100644
--- a/doc/src/snippets/declarative/qtbinding/context-advanced/connections.qml
+++ b/doc/src/snippets/qml/qtbinding/context-advanced/connections.qml
diff --git a/doc/src/snippets/declarative/qtbinding/context-advanced/main.cpp b/doc/src/snippets/qml/qtbinding/context-advanced/main.cpp
index d7cfe6f3ef..b9676e4b66 100644
--- a/doc/src/snippets/declarative/qtbinding/context-advanced/main.cpp
+++ b/doc/src/snippets/qml/qtbinding/context-advanced/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
#include <QtCore>
-#include <QtDeclarative>
+#include <QtQml>
#include "applicationdata.h"
@@ -46,7 +46,7 @@
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
- QDeclarativeView view;
+ QQuickView view;
ApplicationData data;
view.rootContext()->setContextProperty("applicationData", &data);
diff --git a/doc/src/snippets/declarative/qtbinding/context/MyItem.qml b/doc/src/snippets/qml/qtbinding/context/MyItem.qml
index 3abf2411f0..3abf2411f0 100644
--- a/doc/src/snippets/declarative/qtbinding/context/MyItem.qml
+++ b/doc/src/snippets/qml/qtbinding/context/MyItem.qml
diff --git a/doc/src/snippets/declarative/qtbinding/context/main.cpp b/doc/src/snippets/qml/qtbinding/context/main.cpp
index e0d9a83e64..0849a845a6 100644
--- a/doc/src/snippets/declarative/qtbinding/context/main.cpp
+++ b/doc/src/snippets/qml/qtbinding/context/main.cpp
@@ -38,14 +38,14 @@
**
****************************************************************************/
#include <QtCore>
-#include <QtDeclarative>
+#include <QtQml>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
//![0]
-QDeclarativeView view;
+QQuickView view;
view.rootContext()->setContextProperty("currentDateTime", QDateTime::currentDateTime());
view.setSource(QUrl::fromLocalFile("MyItem.qml"));
view.show();
diff --git a/doc/src/snippets/declarative/qtbinding/enums/imageviewer.h b/doc/src/snippets/qml/qtbinding/enums/imageviewer.h
index de9f2ecaab..df9709953f 100644
--- a/doc/src/snippets/declarative/qtbinding/enums/imageviewer.h
+++ b/doc/src/snippets/qml/qtbinding/enums/imageviewer.h
@@ -38,10 +38,10 @@
**
****************************************************************************/
#include <QtCore>
-#include <QtDeclarative>
+#include <QtQml>
//![start]
-class ImageViewer : public QDeclarativeItem
+class ImageViewer : public QQuickItem
{
Q_OBJECT
Q_ENUMS(Status)
@@ -56,7 +56,7 @@ public:
Status status() const;
//![start]
- ImageViewer(QDeclarativeItem *parent = 0);
+ ImageViewer(QQuickItem *parent = 0);
public slots:
void emitSignals();
diff --git a/doc/src/snippets/declarative/qtbinding/enums/standalone.qml b/doc/src/snippets/qml/qtbinding/enums/standalone.qml
index 5641854175..5641854175 100644
--- a/doc/src/snippets/declarative/qtbinding/enums/standalone.qml
+++ b/doc/src/snippets/qml/qtbinding/enums/standalone.qml
diff --git a/doc/src/snippets/declarative/qtbinding/functions-cpp/MyItem.qml b/doc/src/snippets/qml/qtbinding/functions-cpp/MyItem.qml
index e5ba588b25..e5ba588b25 100644
--- a/doc/src/snippets/declarative/qtbinding/functions-cpp/MyItem.qml
+++ b/doc/src/snippets/qml/qtbinding/functions-cpp/MyItem.qml
diff --git a/doc/src/snippets/declarative/qtbinding/functions-cpp/main.cpp b/doc/src/snippets/qml/qtbinding/functions-cpp/main.cpp
index 5e6c474a8f..3d63e055a3 100644
--- a/doc/src/snippets/declarative/qtbinding/functions-cpp/main.cpp
+++ b/doc/src/snippets/qml/qtbinding/functions-cpp/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
#include <QtCore>
-#include <QtDeclarative>
+#include <QtQml>
#include "myclass.h"
@@ -46,7 +46,7 @@
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
- QDeclarativeView view;
+ QQuickView view;
MyClass myClass;
view.rootContext()->setContextProperty("myObject", &myClass);
diff --git a/doc/src/snippets/declarative/qtbinding/functions-cpp/myclass.h b/doc/src/snippets/qml/qtbinding/functions-cpp/myclass.h
index 8b6847ca99..8b6847ca99 100644
--- a/doc/src/snippets/declarative/qtbinding/functions-cpp/myclass.h
+++ b/doc/src/snippets/qml/qtbinding/functions-cpp/myclass.h
diff --git a/doc/src/snippets/declarative/qtbinding/functions-qml/MyItem.qml b/doc/src/snippets/qml/qtbinding/functions-qml/MyItem.qml
index a8b41d55a0..a8b41d55a0 100644
--- a/doc/src/snippets/declarative/qtbinding/functions-qml/MyItem.qml
+++ b/doc/src/snippets/qml/qtbinding/functions-qml/MyItem.qml
diff --git a/doc/src/snippets/declarative/qtbinding/functions-qml/main.cpp b/doc/src/snippets/qml/qtbinding/functions-qml/main.cpp
index ba72e9459a..5c6a0c507d 100644
--- a/doc/src/snippets/declarative/qtbinding/functions-qml/main.cpp
+++ b/doc/src/snippets/qml/qtbinding/functions-qml/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
#include <QtCore>
-#include <QtDeclarative>
+#include <QtQml>
int main(int argc, char *argv[])
{
@@ -46,8 +46,8 @@ int main(int argc, char *argv[])
//![0]
// main.cpp
-QDeclarativeEngine engine;
-QDeclarativeComponent component(&engine, "MyItem.qml");
+QQmlEngine engine;
+QQmlComponent component(&engine, "MyItem.qml");
QObject *object = component.create();
QVariant returnedValue;
diff --git a/doc/src/snippets/declarative/qtbinding/loading/MyItem.qml b/doc/src/snippets/qml/qtbinding/loading/MyItem.qml
index b496479c95..b496479c95 100644
--- a/doc/src/snippets/declarative/qtbinding/loading/MyItem.qml
+++ b/doc/src/snippets/qml/qtbinding/loading/MyItem.qml
diff --git a/doc/src/snippets/declarative/qtbinding/loading/main.cpp b/doc/src/snippets/qml/qtbinding/loading/main.cpp
index 839b7352a5..98ed4173f9 100644
--- a/doc/src/snippets/declarative/qtbinding/loading/main.cpp
+++ b/doc/src/snippets/qml/qtbinding/loading/main.cpp
@@ -38,38 +38,38 @@
**
****************************************************************************/
#include <QtCore>
-#include <QtDeclarative>
+#include <QtQml>
static void withComponent()
{
-//![QDeclarativeComponent-a]
-// Using QDeclarativeComponent
-QDeclarativeEngine engine;
-QDeclarativeComponent component(&engine,
+//![QQmlComponent-a]
+// Using QQmlComponent
+QQmlEngine engine;
+QQmlComponent component(&engine,
QUrl::fromLocalFile("MyItem.qml"));
QObject *object = component.create();
-//![QDeclarativeComponent-a]
+//![QQmlComponent-a]
}
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
-//![QDeclarativeView]
-// Using QDeclarativeView
-QDeclarativeView view;
+//![QQuickView]
+// Using QQuickView
+QQuickView view;
view.setSource(QUrl::fromLocalFile("MyItem.qml"));
view.show();
QObject *object = view.rootObject();
-//![QDeclarativeView]
+//![QQuickView]
//![properties]
object->setProperty("width", 500);
-QDeclarativeProperty(object, "width").write(500);
+QQmlProperty(object, "width").write(500);
//![properties]
//![cast]
-QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(object);
+QQuickItem *item = qobject_cast<QQuickItem*>(object);
item->setWidth(500);
//![cast]
@@ -79,9 +79,9 @@ if (rect)
rect->setProperty("color", "red");
//![findChild]
-//![QDeclarativeComponent-b]
+//![QQmlComponent-b]
delete object;
-//![QDeclarativeComponent-b]
+//![QQmlComponent-b]
withComponent();
diff --git a/doc/src/snippets/declarative/qtbinding/newelements/imageviewer.h b/doc/src/snippets/qml/qtbinding/newelements/imageviewer.h
index 7bbc243d83..3559951693 100644
--- a/doc/src/snippets/declarative/qtbinding/newelements/imageviewer.h
+++ b/doc/src/snippets/qml/qtbinding/newelements/imageviewer.h
@@ -39,9 +39,9 @@
****************************************************************************/
//![0]
#include <QtCore>
-#include <QtDeclarative>
+#include <QtQml>
-class ImageViewer : public QDeclarativeItem
+class ImageViewer : public QQuickItem
{
Q_OBJECT
Q_PROPERTY(QUrl image READ image WRITE setImage NOTIFY imageChanged)
diff --git a/doc/src/snippets/declarative/qtbinding/newelements/main.cpp b/doc/src/snippets/qml/qtbinding/newelements/main.cpp
index ead2fd1722..8ab7eb63f4 100644
--- a/doc/src/snippets/declarative/qtbinding/newelements/main.cpp
+++ b/doc/src/snippets/qml/qtbinding/newelements/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
#include <QtCore>
-#include <QtDeclarative>
+#include <QtQml>
#include "imageviewer.h"
@@ -53,7 +53,7 @@ int main(int argc, char *argv[])
qmlRegisterType<ImageViewer>("MyLibrary", 1, 0, "ImageViewer");
//![register]
- QDeclarativeView view;
+ QQuickView view;
view.setSource(QUrl::fromLocalFile("standalone.qml"));
view.show();
diff --git a/doc/src/snippets/declarative/qtbinding/newelements/standalone.qml b/doc/src/snippets/qml/qtbinding/newelements/standalone.qml
index d2a8926bd0..d2a8926bd0 100644
--- a/doc/src/snippets/declarative/qtbinding/newelements/standalone.qml
+++ b/doc/src/snippets/qml/qtbinding/newelements/standalone.qml
diff --git a/doc/src/snippets/declarative/qtbinding/properties-cpp/MyItem.qml b/doc/src/snippets/qml/qtbinding/properties-cpp/MyItem.qml
index f2a14d92a4..f2a14d92a4 100644
--- a/doc/src/snippets/declarative/qtbinding/properties-cpp/MyItem.qml
+++ b/doc/src/snippets/qml/qtbinding/properties-cpp/MyItem.qml
diff --git a/doc/src/snippets/declarative/qtbinding/properties-cpp/applicationdata.h b/doc/src/snippets/qml/qtbinding/properties-cpp/applicationdata.h
index b558e8528f..b558e8528f 100644
--- a/doc/src/snippets/declarative/qtbinding/properties-cpp/applicationdata.h
+++ b/doc/src/snippets/qml/qtbinding/properties-cpp/applicationdata.h
diff --git a/doc/src/snippets/declarative/qtbinding/properties-qml/MyItem.qml b/doc/src/snippets/qml/qtbinding/properties-qml/MyItem.qml
index 87015eac24..87015eac24 100644
--- a/doc/src/snippets/declarative/qtbinding/properties-qml/MyItem.qml
+++ b/doc/src/snippets/qml/qtbinding/properties-qml/MyItem.qml
diff --git a/doc/src/snippets/declarative/qtbinding/properties-qml/main.cpp b/doc/src/snippets/qml/qtbinding/properties-qml/main.cpp
index 91347ee70f..15cb517c7b 100644
--- a/doc/src/snippets/declarative/qtbinding/properties-qml/main.cpp
+++ b/doc/src/snippets/qml/qtbinding/properties-qml/main.cpp
@@ -38,19 +38,19 @@
**
****************************************************************************/
#include <QtCore>
-#include <QtDeclarative>
+#include <QtQml>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
//![0]
-QDeclarativeEngine engine;
-QDeclarativeComponent component(&engine, "MyItem.qml");
+QQmlEngine engine;
+QQmlComponent component(&engine, "MyItem.qml");
QObject *object = component.create();
-qDebug() << "Property value:" << QDeclarativeProperty::read(object, "someNumber").toInt();
-QDeclarativeProperty::write(object, "someNumber", 5000);
+qDebug() << "Property value:" << QQmlProperty::read(object, "someNumber").toInt();
+QQmlProperty::write(object, "someNumber", 5000);
qDebug() << "Property value:" << object->property("someNumber").toInt();
object->setProperty("someNumber", 100);
diff --git a/doc/src/snippets/declarative/qtbinding/resources/example.qrc b/doc/src/snippets/qml/qtbinding/resources/example.qrc
index 5e4941512b..5e4941512b 100644
--- a/doc/src/snippets/declarative/qtbinding/resources/example.qrc
+++ b/doc/src/snippets/qml/qtbinding/resources/example.qrc
diff --git a/doc/src/snippets/declarative/qtbinding/resources/main.cpp b/doc/src/snippets/qml/qtbinding/resources/main.cpp
index 0ec1189eeb..2902064fc9 100644
--- a/doc/src/snippets/declarative/qtbinding/resources/main.cpp
+++ b/doc/src/snippets/qml/qtbinding/resources/main.cpp
@@ -39,15 +39,15 @@
****************************************************************************/
#include <QApplication>
-#include <QDeclarativeView>
-#include <QDeclarativeContext>
+#include <QQuickView>
+#include <QQmlContext>
//![0]
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- QDeclarativeView view;
+ QQuickView view;
view.setSource(QUrl("qrc:/main.qml"));
view.show();
diff --git a/doc/src/snippets/declarative/qtbinding/resources/main.qml b/doc/src/snippets/qml/qtbinding/resources/main.qml
index 670d1a5309..670d1a5309 100644
--- a/doc/src/snippets/declarative/qtbinding/resources/main.qml
+++ b/doc/src/snippets/qml/qtbinding/resources/main.qml
diff --git a/doc/src/snippets/declarative/qtbinding/resources/resources.pro b/doc/src/snippets/qml/qtbinding/resources/resources.pro
index cc01ee126f..5aee288a6e 100644
--- a/doc/src/snippets/declarative/qtbinding/resources/resources.pro
+++ b/doc/src/snippets/qml/qtbinding/resources/resources.pro
@@ -1,4 +1,4 @@
-QT += declarative
+QT += qml
SOURCES += main.cpp
RESOURCES += example.qrc
diff --git a/doc/src/snippets/declarative/qtbinding/signals-cpp/MyItem.qml b/doc/src/snippets/qml/qtbinding/signals-cpp/MyItem.qml
index 17df7704c5..17df7704c5 100644
--- a/doc/src/snippets/declarative/qtbinding/signals-cpp/MyItem.qml
+++ b/doc/src/snippets/qml/qtbinding/signals-cpp/MyItem.qml
diff --git a/doc/src/snippets/declarative/qtbinding/signals-cpp/imageviewer.h b/doc/src/snippets/qml/qtbinding/signals-cpp/imageviewer.h
index a066447cfb..3423295234 100644
--- a/doc/src/snippets/declarative/qtbinding/signals-cpp/imageviewer.h
+++ b/doc/src/snippets/qml/qtbinding/signals-cpp/imageviewer.h
@@ -38,16 +38,16 @@
**
****************************************************************************/
#include <QtCore>
-#include <QtDeclarative>
+#include <QtQml>
//![start]
-class ImageViewer : public QDeclarativeItem
+class ImageViewer : public QQuickItem
{
Q_OBJECT
Q_PROPERTY(QUrl image READ image WRITE setImage NOTIFY imageChanged)
public:
//![start]
- ImageViewer(QDeclarativeItem *item = 0);
+ ImageViewer(QQuickItem *item = 0);
void setImage(const QUrl &url) {}
QUrl image() const { return QUrl(); }
diff --git a/doc/src/snippets/declarative/qtbinding/signals-cpp/main.cpp b/doc/src/snippets/qml/qtbinding/signals-cpp/main.cpp
index f3ea3f26df..402e811913 100644
--- a/doc/src/snippets/declarative/qtbinding/signals-cpp/main.cpp
+++ b/doc/src/snippets/qml/qtbinding/signals-cpp/main.cpp
@@ -38,13 +38,13 @@
**
****************************************************************************/
#include <QtCore>
-#include <QtDeclarative>
+#include <QtQml>
#include "imageviewer.h"
-ImageViewer::ImageViewer(QDeclarativeItem *item)
- : QDeclarativeItem(item)
+ImageViewer::ImageViewer(QQuickItem *item)
+ : QQuickItem(item)
{
QTimer::singleShot(0, this, SLOT(emitSignals()));
}
@@ -61,14 +61,14 @@ int main(int argc, char *argv[])
qmlRegisterType<ImageViewer>("MyLibrary", 1, 0, "ImageViewer");
- QDeclarativeView standalone;
+ QQuickView standalone;
standalone.setSource(QUrl::fromLocalFile("standalone.qml"));
standalone.show();
//![connections]
ImageViewer viewer;
-QDeclarativeView view;
+QQuickView view;
view.rootContext()->setContextProperty("imageViewer", &viewer);
view.setSource(QUrl::fromLocalFile("MyItem.qml"));
diff --git a/doc/src/snippets/declarative/qtbinding/signals-cpp/standalone.qml b/doc/src/snippets/qml/qtbinding/signals-cpp/standalone.qml
index 33afc1f39c..33afc1f39c 100644
--- a/doc/src/snippets/declarative/qtbinding/signals-cpp/standalone.qml
+++ b/doc/src/snippets/qml/qtbinding/signals-cpp/standalone.qml
diff --git a/doc/src/snippets/declarative/qtbinding/signals-qml/MyItem.qml b/doc/src/snippets/qml/qtbinding/signals-qml/MyItem.qml
index 9269b51863..9269b51863 100644
--- a/doc/src/snippets/declarative/qtbinding/signals-qml/MyItem.qml
+++ b/doc/src/snippets/qml/qtbinding/signals-qml/MyItem.qml
diff --git a/doc/src/snippets/declarative/qtbinding/signals-qml/main.cpp b/doc/src/snippets/qml/qtbinding/signals-qml/main.cpp
index 084d5f0e4b..8528d9ce5e 100644
--- a/doc/src/snippets/declarative/qtbinding/signals-qml/main.cpp
+++ b/doc/src/snippets/qml/qtbinding/signals-qml/main.cpp
@@ -38,13 +38,13 @@
**
****************************************************************************/
#include <QtCore>
-#include <QtDeclarative>
+#include <QtQml>
//![0]
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
- QDeclarativeView view(QUrl::fromLocalFile("MyItem.qml"));
+ QQuickView view(QUrl::fromLocalFile("MyItem.qml"));
QObject *item = view.rootObject();
MyClass myClass;
diff --git a/doc/src/snippets/declarative/qtbinding/signals-qml/myclass.h b/doc/src/snippets/qml/qtbinding/signals-qml/myclass.h
index 6275de6b2c..6275de6b2c 100644
--- a/doc/src/snippets/declarative/qtbinding/signals-qml/myclass.h
+++ b/doc/src/snippets/qml/qtbinding/signals-qml/myclass.h
diff --git a/doc/src/snippets/declarative/qtbinding/variantlistmap/MyItem.qml b/doc/src/snippets/qml/qtbinding/variantlistmap/MyItem.qml
index ff4be87795..ff4be87795 100644
--- a/doc/src/snippets/declarative/qtbinding/variantlistmap/MyItem.qml
+++ b/doc/src/snippets/qml/qtbinding/variantlistmap/MyItem.qml
diff --git a/doc/src/snippets/declarative/qtbinding/variantlistmap/main.cpp b/doc/src/snippets/qml/qtbinding/variantlistmap/main.cpp
index 1cebecdff4..a10b9a8c12 100644
--- a/doc/src/snippets/declarative/qtbinding/variantlistmap/main.cpp
+++ b/doc/src/snippets/qml/qtbinding/variantlistmap/main.cpp
@@ -38,14 +38,14 @@
**
****************************************************************************/
#include <QtCore>
-#include <QtDeclarative>
+#include <QtQml>
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
//![0]
// C++
-QDeclarativeView view(QUrl::fromLocalFile("MyItem.qml"));
+QQuickView view(QUrl::fromLocalFile("MyItem.qml"));
QVariantList list;
list << 10 << Qt::green << "bottles";
diff --git a/doc/src/snippets/declarative/qtobject.qml b/doc/src/snippets/qml/qtobject.qml
index 04811b6316..04811b6316 100644
--- a/doc/src/snippets/declarative/qtobject.qml
+++ b/doc/src/snippets/qml/qtobject.qml
diff --git a/doc/src/snippets/declarative/rectangle/rect-border-width.qml b/doc/src/snippets/qml/rectangle/rect-border-width.qml
index 6dd4dbe739..6dd4dbe739 100644
--- a/doc/src/snippets/declarative/rectangle/rect-border-width.qml
+++ b/doc/src/snippets/qml/rectangle/rect-border-width.qml
diff --git a/doc/src/snippets/declarative/rectangle/rectangle-colors.qml b/doc/src/snippets/qml/rectangle/rectangle-colors.qml
index 70f7a203f4..70f7a203f4 100644
--- a/doc/src/snippets/declarative/rectangle/rectangle-colors.qml
+++ b/doc/src/snippets/qml/rectangle/rectangle-colors.qml
diff --git a/doc/src/snippets/declarative/rectangle/rectangle-gradient.qml b/doc/src/snippets/qml/rectangle/rectangle-gradient.qml
index e8146a6467..e8146a6467 100644
--- a/doc/src/snippets/declarative/rectangle/rectangle-gradient.qml
+++ b/doc/src/snippets/qml/rectangle/rectangle-gradient.qml
diff --git a/doc/src/snippets/declarative/rectangle/rectangle.qml b/doc/src/snippets/qml/rectangle/rectangle.qml
index c315a27da0..c315a27da0 100644
--- a/doc/src/snippets/declarative/rectangle/rectangle.qml
+++ b/doc/src/snippets/qml/rectangle/rectangle.qml
diff --git a/doc/src/snippets/declarative/repeaters/repeater-grid-index.qml b/doc/src/snippets/qml/repeaters/repeater-grid-index.qml
index 0f2b770d82..0f2b770d82 100644
--- a/doc/src/snippets/declarative/repeaters/repeater-grid-index.qml
+++ b/doc/src/snippets/qml/repeaters/repeater-grid-index.qml
diff --git a/doc/src/snippets/declarative/repeaters/repeater.qml b/doc/src/snippets/qml/repeaters/repeater.qml
index 856b038a04..856b038a04 100644
--- a/doc/src/snippets/declarative/repeaters/repeater.qml
+++ b/doc/src/snippets/qml/repeaters/repeater.qml
diff --git a/doc/src/snippets/declarative/reusablecomponents/Button.qml b/doc/src/snippets/qml/reusablecomponents/Button.qml
index cedc782f75..cedc782f75 100644
--- a/doc/src/snippets/declarative/reusablecomponents/Button.qml
+++ b/doc/src/snippets/qml/reusablecomponents/Button.qml
diff --git a/doc/src/snippets/declarative/reusablecomponents/application.qml b/doc/src/snippets/qml/reusablecomponents/application.qml
index 42428ce25e..42428ce25e 100644
--- a/doc/src/snippets/declarative/reusablecomponents/application.qml
+++ b/doc/src/snippets/qml/reusablecomponents/application.qml
diff --git a/doc/src/snippets/declarative/reusablecomponents/component.qml b/doc/src/snippets/qml/reusablecomponents/component.qml
index 9a60468d73..9a60468d73 100644
--- a/doc/src/snippets/declarative/reusablecomponents/component.qml
+++ b/doc/src/snippets/qml/reusablecomponents/component.qml
diff --git a/doc/src/snippets/declarative/reusablecomponents/focusbutton.qml b/doc/src/snippets/qml/reusablecomponents/focusbutton.qml
index 34fc6294e2..34fc6294e2 100644
--- a/doc/src/snippets/declarative/reusablecomponents/focusbutton.qml
+++ b/doc/src/snippets/qml/reusablecomponents/focusbutton.qml
diff --git a/doc/src/snippets/declarative/reusablecomponents/qmldir b/doc/src/snippets/qml/reusablecomponents/qmldir
index 253732de01..253732de01 100644
--- a/doc/src/snippets/declarative/reusablecomponents/qmldir
+++ b/doc/src/snippets/qml/reusablecomponents/qmldir
diff --git a/doc/src/snippets/declarative/righttoleft.qml b/doc/src/snippets/qml/righttoleft.qml
index 0566be2f67..0566be2f67 100644
--- a/doc/src/snippets/declarative/righttoleft.qml
+++ b/doc/src/snippets/qml/righttoleft.qml
diff --git a/doc/src/snippets/declarative/righttoleft/Child.qml b/doc/src/snippets/qml/righttoleft/Child.qml
index 50068540cb..50068540cb 100644
--- a/doc/src/snippets/declarative/righttoleft/Child.qml
+++ b/doc/src/snippets/qml/righttoleft/Child.qml
diff --git a/doc/src/snippets/declarative/rotation.qml b/doc/src/snippets/qml/rotation.qml
index c7f9df3a9b..c7f9df3a9b 100644
--- a/doc/src/snippets/declarative/rotation.qml
+++ b/doc/src/snippets/qml/rotation.qml
diff --git a/doc/src/snippets/declarative/rotationanimation.qml b/doc/src/snippets/qml/rotationanimation.qml
index caa1ce8207..caa1ce8207 100644
--- a/doc/src/snippets/declarative/rotationanimation.qml
+++ b/doc/src/snippets/qml/rotationanimation.qml
diff --git a/doc/src/snippets/declarative/row.qml b/doc/src/snippets/qml/row.qml
index 3e505717d6..3e505717d6 100644
--- a/doc/src/snippets/declarative/row.qml
+++ b/doc/src/snippets/qml/row.qml
diff --git a/doc/src/snippets/declarative/row/row.qml b/doc/src/snippets/qml/row/row.qml
index 465baa577b..465baa577b 100644
--- a/doc/src/snippets/declarative/row/row.qml
+++ b/doc/src/snippets/qml/row/row.qml
diff --git a/doc/src/snippets/declarative/script.js b/doc/src/snippets/qml/script.js
index f55dee3507..f55dee3507 100644
--- a/doc/src/snippets/declarative/script.js
+++ b/doc/src/snippets/qml/script.js
diff --git a/doc/src/snippets/declarative/sequentialanimation.qml b/doc/src/snippets/qml/sequentialanimation.qml
index 73923e4ea0..73923e4ea0 100644
--- a/doc/src/snippets/declarative/sequentialanimation.qml
+++ b/doc/src/snippets/qml/sequentialanimation.qml
diff --git a/doc/src/snippets/declarative/smoothedanimation.qml b/doc/src/snippets/qml/smoothedanimation.qml
index ba6f505976..ba6f505976 100644
--- a/doc/src/snippets/declarative/smoothedanimation.qml
+++ b/doc/src/snippets/qml/smoothedanimation.qml
diff --git a/doc/src/snippets/declarative/springanimation.qml b/doc/src/snippets/qml/springanimation.qml
index e04c483405..e04c483405 100644
--- a/doc/src/snippets/declarative/springanimation.qml
+++ b/doc/src/snippets/qml/springanimation.qml
diff --git a/doc/src/snippets/declarative/state-when.qml b/doc/src/snippets/qml/state-when.qml
index de9fb39cef..de9fb39cef 100644
--- a/doc/src/snippets/declarative/state-when.qml
+++ b/doc/src/snippets/qml/state-when.qml
diff --git a/doc/src/snippets/declarative/state.qml b/doc/src/snippets/qml/state.qml
index 5948cba770..5948cba770 100644
--- a/doc/src/snippets/declarative/state.qml
+++ b/doc/src/snippets/qml/state.qml
diff --git a/doc/src/snippets/declarative/states.qml b/doc/src/snippets/qml/states.qml
index aeb805f38e..aeb805f38e 100644
--- a/doc/src/snippets/declarative/states.qml
+++ b/doc/src/snippets/qml/states.qml
diff --git a/doc/src/snippets/declarative/states/statechangescript.qml b/doc/src/snippets/qml/states/statechangescript.qml
index 262938fc9c..262938fc9c 100644
--- a/doc/src/snippets/declarative/states/statechangescript.qml
+++ b/doc/src/snippets/qml/states/statechangescript.qml
diff --git a/doc/src/snippets/declarative/systempalette.qml b/doc/src/snippets/qml/systempalette.qml
index 4cb42dee93..4cb42dee93 100644
--- a/doc/src/snippets/declarative/systempalette.qml
+++ b/doc/src/snippets/qml/systempalette.qml
diff --git a/doc/src/snippets/declarative/text/onLinkActivated.qml b/doc/src/snippets/qml/text/onLinkActivated.qml
index 71545ad3e2..03641d989e 100644
--- a/doc/src/snippets/declarative/text/onLinkActivated.qml
+++ b/doc/src/snippets/qml/text/onLinkActivated.qml
@@ -3,7 +3,7 @@
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/
**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
+** This file is part of the QtQml module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
diff --git a/doc/src/snippets/declarative/texthandling.qml b/doc/src/snippets/qml/texthandling.qml
index 03e5011202..03e5011202 100644
--- a/doc/src/snippets/declarative/texthandling.qml
+++ b/doc/src/snippets/qml/texthandling.qml
diff --git a/doc/src/snippets/declarative/transition-from-to-modified.qml b/doc/src/snippets/qml/transition-from-to-modified.qml
index 184e95afe2..184e95afe2 100644
--- a/doc/src/snippets/declarative/transition-from-to-modified.qml
+++ b/doc/src/snippets/qml/transition-from-to-modified.qml
diff --git a/doc/src/snippets/declarative/transition-from-to.qml b/doc/src/snippets/qml/transition-from-to.qml
index c876f5cb9c..c876f5cb9c 100644
--- a/doc/src/snippets/declarative/transition-from-to.qml
+++ b/doc/src/snippets/qml/transition-from-to.qml
diff --git a/doc/src/snippets/declarative/transition-reversible.qml b/doc/src/snippets/qml/transition-reversible.qml
index 4f7ae83468..4f7ae83468 100644
--- a/doc/src/snippets/declarative/transition-reversible.qml
+++ b/doc/src/snippets/qml/transition-reversible.qml
diff --git a/doc/src/snippets/declarative/transition.qml b/doc/src/snippets/qml/transition.qml
index 614c5d364f..614c5d364f 100644
--- a/doc/src/snippets/declarative/transition.qml
+++ b/doc/src/snippets/qml/transition.qml
diff --git a/doc/src/snippets/declarative/transitions-list.qml b/doc/src/snippets/qml/transitions-list.qml
index f2ba768559..f2ba768559 100644
--- a/doc/src/snippets/declarative/transitions-list.qml
+++ b/doc/src/snippets/qml/transitions-list.qml
diff --git a/doc/src/snippets/declarative/viewtransitions/viewtransitions-basic.qml b/doc/src/snippets/qml/viewtransitions/viewtransitions-basic.qml
index 8a05491ee1..8a05491ee1 100644
--- a/doc/src/snippets/declarative/viewtransitions/viewtransitions-basic.qml
+++ b/doc/src/snippets/qml/viewtransitions/viewtransitions-basic.qml
diff --git a/doc/src/snippets/declarative/viewtransitions/viewtransitions-delayedbyindex.qml b/doc/src/snippets/qml/viewtransitions/viewtransitions-delayedbyindex.qml
index 79d00d2d1c..79d00d2d1c 100644
--- a/doc/src/snippets/declarative/viewtransitions/viewtransitions-delayedbyindex.qml
+++ b/doc/src/snippets/qml/viewtransitions/viewtransitions-delayedbyindex.qml
diff --git a/doc/src/snippets/declarative/viewtransitions/viewtransitions-intermediatemove.qml b/doc/src/snippets/qml/viewtransitions/viewtransitions-intermediatemove.qml
index a43d3a8b7f..a43d3a8b7f 100644
--- a/doc/src/snippets/declarative/viewtransitions/viewtransitions-intermediatemove.qml
+++ b/doc/src/snippets/qml/viewtransitions/viewtransitions-intermediatemove.qml
diff --git a/doc/src/snippets/declarative/viewtransitions/viewtransitions-interruptedgood.qml b/doc/src/snippets/qml/viewtransitions/viewtransitions-interruptedgood.qml
index 1355268710..1355268710 100644
--- a/doc/src/snippets/declarative/viewtransitions/viewtransitions-interruptedgood.qml
+++ b/doc/src/snippets/qml/viewtransitions/viewtransitions-interruptedgood.qml
diff --git a/doc/src/snippets/declarative/viewtransitions/viewtransitions-pathanim.qml b/doc/src/snippets/qml/viewtransitions/viewtransitions-pathanim.qml
index 3d075c4367..3d075c4367 100644
--- a/doc/src/snippets/declarative/viewtransitions/viewtransitions-pathanim.qml
+++ b/doc/src/snippets/qml/viewtransitions/viewtransitions-pathanim.qml
diff --git a/doc/src/snippets/declarative/viewtransitions/viewtransitions-scriptactionbad.qml b/doc/src/snippets/qml/viewtransitions/viewtransitions-scriptactionbad.qml
index 03348356e1..03348356e1 100644
--- a/doc/src/snippets/declarative/viewtransitions/viewtransitions-scriptactionbad.qml
+++ b/doc/src/snippets/qml/viewtransitions/viewtransitions-scriptactionbad.qml
diff --git a/doc/src/snippets/declarative/viewtransitions/viewtransitions-scriptactiongood.qml b/doc/src/snippets/qml/viewtransitions/viewtransitions-scriptactiongood.qml
index eda5c35479..eda5c35479 100644
--- a/doc/src/snippets/declarative/viewtransitions/viewtransitions-scriptactiongood.qml
+++ b/doc/src/snippets/qml/viewtransitions/viewtransitions-scriptactiongood.qml
diff --git a/doc/src/snippets/declarative/visualdatagroup.qml b/doc/src/snippets/qml/visualdatagroup.qml
index 46ac9a3d7a..46ac9a3d7a 100644
--- a/doc/src/snippets/declarative/visualdatagroup.qml
+++ b/doc/src/snippets/qml/visualdatagroup.qml
diff --git a/doc/src/snippets/declarative/visualdatamodel.qml b/doc/src/snippets/qml/visualdatamodel.qml
index 87b836e224..87b836e224 100644
--- a/doc/src/snippets/declarative/visualdatamodel.qml
+++ b/doc/src/snippets/qml/visualdatamodel.qml
diff --git a/doc/src/snippets/declarative/visualdatamodel_rootindex/main.cpp b/doc/src/snippets/qml/visualdatamodel_rootindex/main.cpp
index 206828e883..4468d06db4 100644
--- a/doc/src/snippets/declarative/visualdatamodel_rootindex/main.cpp
+++ b/doc/src/snippets/qml/visualdatamodel_rootindex/main.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/
**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
+** This file is part of the QtQml module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
@@ -37,8 +37,8 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include <QDeclarativeView>
-#include <QDeclarativeContext>
+#include <QQuickView>
+#include <QQmlContext>
#include <QApplication>
#include <QDirModel>
@@ -48,7 +48,7 @@ int main(int argc, char ** argv)
{
QApplication app(argc, argv);
- QDeclarativeView view;
+ QQuickView view;
QDirModel model;
view.rootContext()->setContextProperty("dirModel", &model);
diff --git a/doc/src/snippets/declarative/visualdatamodel_rootindex/view.qml b/doc/src/snippets/qml/visualdatamodel_rootindex/view.qml
index 24d6b47f8d..24d6b47f8d 100644
--- a/doc/src/snippets/declarative/visualdatamodel_rootindex/view.qml
+++ b/doc/src/snippets/qml/visualdatamodel_rootindex/view.qml
diff --git a/doc/src/snippets/declarative/workerscript.qml b/doc/src/snippets/qml/workerscript.qml
index 6af6b47766..6af6b47766 100644
--- a/doc/src/snippets/declarative/workerscript.qml
+++ b/doc/src/snippets/qml/workerscript.qml
diff --git a/doc/src/snippets/declarative/xmlrole.qml b/doc/src/snippets/qml/xmlrole.qml
index 34868fb76d..34868fb76d 100644
--- a/doc/src/snippets/declarative/xmlrole.qml
+++ b/doc/src/snippets/qml/xmlrole.qml
diff --git a/doc/src/snippets/declarative/xmlrole.xml b/doc/src/snippets/qml/xmlrole.xml
index c9f999e523..c9f999e523 100644
--- a/doc/src/snippets/declarative/xmlrole.xml
+++ b/doc/src/snippets/qml/xmlrole.xml
diff --git a/doc/src/snippets/qtjavascript/evaluation/main.cpp b/doc/src/snippets/qtjavascript/evaluation/main.cpp
index 8d1cbf0484..3d3e3bfda2 100644
--- a/doc/src/snippets/qtjavascript/evaluation/main.cpp
+++ b/doc/src/snippets/qtjavascript/evaluation/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtDeclarative>
+#include <QtQml>
int main(int argc, char *argv[])
{
diff --git a/doc/src/snippets/qtjavascript/registeringobjects/main.cpp b/doc/src/snippets/qtjavascript/registeringobjects/main.cpp
index 27d696da63..f34c1061fe 100644
--- a/doc/src/snippets/qtjavascript/registeringobjects/main.cpp
+++ b/doc/src/snippets/qtjavascript/registeringobjects/main.cpp
@@ -39,7 +39,7 @@
****************************************************************************/
#include <QObject>
-#include <QtDeclarative>
+#include <QtQml>
#include "myobject.h"
int main(int argc, char *argv[])
diff --git a/doc/src/snippets/qtjavascript/registeringvalues/main.cpp b/doc/src/snippets/qtjavascript/registeringvalues/main.cpp
index be2d293cf7..f168f4f554 100644
--- a/doc/src/snippets/qtjavascript/registeringvalues/main.cpp
+++ b/doc/src/snippets/qtjavascript/registeringvalues/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtDeclarative>
+#include <QtQml>
int main(int argc, char *argv[])
{
diff --git a/doc/src/whatsnew.qdoc b/doc/src/whatsnew.qdoc
index 88d5e91d76..bf77e0e6c0 100644
--- a/doc/src/whatsnew.qdoc
+++ b/doc/src/whatsnew.qdoc
@@ -67,8 +67,8 @@ Properties of the "var" type may hold JavaScript references. See \l{QML Basic T
QML properties of type \c var and \c variant can now hold pixmaps. See \l{Scarce Resources in JavaScript} for more information
-QDeclarativeExpression can now be directly (and more efficiently) constructed from a
-QDeclarativeScriptString.
+QQmlExpression can now be directly (and more efficiently) constructed from a
+QQmlScriptString.
Support for certain sequence types (QList<int>, QList<qreal>, QList<bool>, QList<QUrl>, QList<QString> and QStringList) has been improved.
QObjects can define Q_PROPERTYs of these types which can be accessed transparently from JavaScript. See the section on