diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-02-24 05:23:23 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-02-24 05:23:23 (GMT) |
commit | 8848b63187cf1b073891bdd6998273a8869bb033 (patch) | |
tree | 08e9934d033c474c5cb03e2dfbf277be90d62c9f /src/declarative/graphicsitems/qdeclarativeimage.cpp | |
parent | 915ab7d8c75a190003db97bc0a92656ee65f5b4b (diff) | |
download | Qt-8848b63187cf1b073891bdd6998273a8869bb033.zip Qt-8848b63187cf1b073891bdd6998273a8869bb033.tar.gz Qt-8848b63187cf1b073891bdd6998273a8869bb033.tar.bz2 |
Add an "asynchonous" property to Image.
Allows loading/decoding local images in an asynchronous thread (already
the case for network images).
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativeimage.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativeimage.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp index 33b38e0..338b086 100644 --- a/src/declarative/graphicsitems/qdeclarativeimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp @@ -300,6 +300,21 @@ void QDeclarativeImage::geometryChanged(const QRectF &newGeometry, const QRectF The URL may be absolute, or relative to the URL of the component. */ +/*! + \qmlproperty bool Image::asynchronous + + Specifies that images on the local filesystem should be loaded + asynchronously in a separate thread. The default value is + false, causing the user interface thread to block while the + image is loaded. Setting \a asynchronous to true is useful where + maintaining a responsive user interface is more desireable + than having images immediately visible. + + Note that this property is only valid for images read from the + local filesystem. Images loaded via a network resource (e.g. HTTP) + are always loaded asynchonously. +*/ + void QDeclarativeImage::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *) { Q_D(QDeclarativeImage); |