aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc
diff options
context:
space:
mode:
authorIonut Alexandrescu <ionut.alexandrescu@qt.io>2017-02-20 13:27:22 +0100
committerIonut Alexandrescu <ionut.alexandrescu@qt.io>2017-02-21 12:30:30 +0000
commitbf1bd3abc9a2d990014fa8be451e0239fe12e198 (patch)
tree2d635481c7f3d92a686282c55c0d916e19b99dad /src/qml/doc
parent3e537dd3dcf5608241282d8437fb1593d2e6fa17 (diff)
Add a javascript push method binding to QQmlListProperty
Create a PropertyList prototype, and add the push method to QQmlListProperty that call the append function if it has been defined. Added a unit test and updated the documentation. Change-Id: I2647766e98b60bf0546f6d6ed1422a616e0d3a07 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/doc')
-rw-r--r--src/qml/doc/src/qmllanguageref/typesystem/basictypes.qdoc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qml/doc/src/qmllanguageref/typesystem/basictypes.qdoc b/src/qml/doc/src/qmllanguageref/typesystem/basictypes.qdoc
index ffbf2282a6..a486b47f03 100644
--- a/src/qml/doc/src/qmllanguageref/typesystem/basictypes.qdoc
+++ b/src/qml/doc/src/qmllanguageref/typesystem/basictypes.qdoc
@@ -324,6 +324,9 @@ property is only invoked when the property is reassigned to a different object v
\li Values in the list are accessed using the \c [index] syntax
\endlist
+ Values can be dynamically added to the list by using the \c push method,
+ as if it were a JavaScript Array
+
A \c list can only store QML objects, and cannot contain any
\l {QML Basic Types}{basic type} values. (To store basic types within a
list, use the \l var type instead.)