diff options
author | Bea Lam <bea.lam@nokia.com> | 2011-02-28 02:31:50 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2011-02-28 02:31:50 (GMT) |
commit | 39013a4a8238d522ed1d13adb25e702da9e25fc9 (patch) | |
tree | c1e85dc48950b8f30bbd756f3b8c30be874c6dd1 /doc/src/declarative | |
parent | b2a0db11c81a47c45d2617b64fef650a830b53f7 (diff) | |
download | Qt-39013a4a8238d522ed1d13adb25e702da9e25fc9.zip Qt-39013a4a8238d522ed1d13adb25e702da9e25fc9.tar.gz Qt-39013a4a8238d522ed1d13adb25e702da9e25fc9.tar.bz2 |
fix/improve docs for new QtQuick 1.1 attributes
Ensure attributes added in QtQuick 1.1 are marked with the
'\since QtQuick 1.1' tag. Also add links to items listed in the
QtQuick 1.1 section in whatsnew.qdoc.
Task-number: QTBUG-17771
Change-Id: Ic8fb3c8d3c99a1469c1767779efaafd27ef460e1
Diffstat (limited to 'doc/src/declarative')
-rw-r--r-- | doc/src/declarative/dynamicobjects.qdoc | 8 | ||||
-rw-r--r-- | doc/src/declarative/whatsnew.qdoc | 61 |
2 files changed, 37 insertions, 32 deletions
diff --git a/doc/src/declarative/dynamicobjects.qdoc b/doc/src/declarative/dynamicobjects.qdoc index 316fe6b..f2ca0fd 100644 --- a/doc/src/declarative/dynamicobjects.qdoc +++ b/doc/src/declarative/dynamicobjects.qdoc @@ -68,9 +68,11 @@ the component. This function can take one or two arguments: \o The first is the parent for the new item. Since graphical items will not appear on the scene without a parent, it is recommended that you set the parent this way. However, if you wish to set the parent later you can safely pass \c null to this function. -\o The second is optional and is a script which assigns values to the item's properties during creation. This avoids warnings - when certain properties have been bound to before they have been set by the code. Additionally, there are small performance - benefits when instantiating objects in this way. +\o The second is optional and is a map of property-value items that define initial any property values for the item. + Property values specified by this argument are applied to the object before its creation is finalized, avoiding + binding errors that may occur if particular properties must be initialized to enable other property bindings. + when certain properties have been bound to before they have been set by the code. Additionally, there are small + performance benefits when compared to defining property values and bindings after the object is created. \endlist Here is an example. First there is \c Sprite.qml, which defines a simple QML component: diff --git a/doc/src/declarative/whatsnew.qdoc b/doc/src/declarative/whatsnew.qdoc index f4359f9..e8c2124 100644 --- a/doc/src/declarative/whatsnew.qdoc +++ b/doc/src/declarative/whatsnew.qdoc @@ -41,10 +41,10 @@ PinchArea provides support for the common two finger pinch gesture. Added the following properties: \list -\o lineSpacing -\o lineCount -\o maximumLineCount -\o truncated +\o \l {Text::}{lineHeight} +\o \l {Text::}{lineCount} +\o \l {Text::}{maximumLineCount} +\o \l {Text::}{truncated} \endlist horizontalAlignment now accepts Text.AlignJustify alignment mode. @@ -53,85 +53,88 @@ horizontalAlignment now accepts Text.AlignJustify alignment mode. Added the following properties, methods and signal handlers: \list -\o canPaste -\o lineCount -\o deselect() -\o moveCursorSelection(int pos, SelectionMode mode) to enable selection by word -\o onLinkActivated(string link) +\o \l {TextEdit::}{canPaste} +\o \l {TextEdit::}{lineCount} +\o \l {TextEdit::}{deselect()} +\o \l {TextEdit::}{moveCursorSelection()} to enable selection by word +\o \l {TextEdit::}{onLinkActivated} \endlist \section2 TextInput Added the following properties and methods: \list -\o canPaste -\o deselect() -\o moveCursorSelection(int pos, SelectionMode mode) to enable selection by word +\o \l{TextInput::}{canPaste} +\o \l{TextInput::}{deselect()} +\o \l{TextInput::}{moveCursorSelection()} to enable selection by word \endlist \section2 Image, BorderImage and AnimatedImage Added the following properties: \list -\o cache -\o mirror +\o \l{Image::}{cache} +\o \l{Image::}{mirror} \endlist \section2 Item Added the following properties: \list -\o implicitWidth and implicitHeight +\o \l{Item::}{implicitWidth} and \l{Item::}{implicitHeight} \endlist \section2 Flickable Added the following methods: \list -\o resizeContent(qreal w, qreal h, QPointF center) -\o returnToBounds() +\o \l{Flickable::}{resizeContent()} +\o \l{Flickable::}{returnToBounds()} \endlist \section2 ListView and GridView Added the following methods: \list -\o positionViewAtBeginning() -\o positionViewAtEnd() +\o \l{ListView::}{positionViewAtBeginning()} +\o \l{ListView::}{positionViewAtEnd()} \endlist -\section2 Flow, Grid, Row +\section2 Flow, Grid and Row Added the following properties: \list -\o layoutDirection +\o \l{Flow::}{layoutDirection} \endlist \section2 Repeater Added the following methods and signal handlers: \list -\o onItemAdded() -\o onItemRemoved() -\o itemAt(int index) +\o \l{Repeater::}{onItemAdded} +\o \l{Repeater::}{onItemRemoved} +\o \l{Repeater::}{itemAt()} \endlist \section2 Component -The createObject() method now accepts a map of initial property values for the created object. +\list +\o The \l{Component::}{createObject()} method now accepts a map of initial property values for +the created object. +\endlist \section2 Qt -Added the following properties and methods: \list -\o application.layoutDirection -\o application.active +\o Added the \l {QML:Qt::application}{Qt.application} object to hold generic global application +properties. \endlist \section2 Other changes \list -\o Functions can be assigned to properties from JavaScript to create property bindings +\o Functions can be \l{Binding Properties from JavaScript}{assigned to properties from JavaScript} +to create property bindings. \endlist |