summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativeimage.cpp
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-11-04 16:05:30 +1000
committerBea Lam <bea.lam@nokia.com>2010-11-04 16:06:25 +1000
commiteedb9980c89e77e21e1336195930a148b6a2e712 (patch)
tree863d51fef79d39c1bcd905790d3b208334c110ee /src/declarative/graphicsitems/qdeclarativeimage.cpp
parentb5588ded342ed9dbc9f00fc8a4091e447880eccc (diff)
Fix errors in example code. Also reverts the example code to the old
list format. Task-number: QTBUG-14871
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativeimage.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimage.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp
index 08d237f265..1f1e93da28 100644
--- a/src/declarative/graphicsitems/qdeclarativeimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp
@@ -288,23 +288,25 @@ qreal QDeclarativeImage::paintedHeight() const
Use this status to provide an update or respond to the status change in some way.
For example, you could:
- \e {Trigger a state change:}
- \qml
- State { name: 'loaded'; when: image.status = Image.Ready }
+ \list
+ \o Trigger a state change:
+ \qml
+ State { name: 'loaded'; when: image.status == Image.Ready }
\endqml
- \e {Implement an \c onStatusChanged signal handler:}
- \qml
+ \o Implement an \c onStatusChanged signal handler:
+ \qml
Image {
id: image
onStatusChanged: if (image.status == Image.Ready) console.log('Loaded')
}
\endqml
- \e {Bind to the status value:}
+ \o Bind to the status value:
\qml
- Text { text: image.status != Image.Ready ? 'Not Loaded' : 'Loaded' }
+ Text { text: image.status == Image.Ready ? 'Loaded' : 'Not loaded' }
\endqml
+ \endlist
\sa progress
*/