From 4ff72975b6501a0003329bb8183479d4df5eda4d Mon Sep 17 00:00:00 2001 From: Chris Adams Date: Tue, 10 May 2011 12:10:06 +1000 Subject: Add user documentation for scarce resource properties Relates to commit 59ace5c5a666b1588560d2aeaa79a57da535e863. Task-number: QMLNG-18 Reviewed-by: Aaron Kennedy Change-Id: I216ced4c663ebab8003978999dc16ac809443a5f --- doc/src/declarative/basictypes.qdoc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'doc/src/declarative/basictypes.qdoc') diff --git a/doc/src/declarative/basictypes.qdoc b/doc/src/declarative/basictypes.qdoc index 4792bba6ef..876ab0038a 100644 --- a/doc/src/declarative/basictypes.qdoc +++ b/doc/src/declarative/basictypes.qdoc @@ -439,7 +439,20 @@ } \endqml - The \c variant type can also hold: + A \c variant type property can also hold an image or pixmap. + A \c variant which contains a QPixmap or QImage is known as a + "scarce resource" and the declarative engine will attempt to + automatically release such resources after evaluation of any JavaScript + expression which requires one to be copied has completed. + + Clients may explicitly release such a scarce resource by calling the + "destroy" method on the \c variant property from within JavaScript. They + may also explicitly preserve the scarce resource by calling the + "preserve" method on the \c variant property from within JavaScript. + For more information regarding the usage of a scarce resource, please + see \l{Scarce Resources in JavaScript}. + + Finally, the \c variant type can also hold: \list \o An array of \l {QML Basic Types}{basic type} values -- cgit v1.2.3