summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativetext.cpp
diff options
context:
space:
mode:
authorJerome Pasion <jerome.pasion@nokia.com>2010-08-31 14:42:50 (GMT)
committerJerome Pasion <jerome.pasion@nokia.com>2010-08-31 14:42:50 (GMT)
commit9e4a58cd4fc2e041ec311b471508abbb65179339 (patch)
treec0a677dd39784984465388c0a64a057648bb815c /src/declarative/graphicsitems/qdeclarativetext.cpp
parent8b2fdaf81ed4c52a75fe3a160c20f76a4eaf1d2b (diff)
downloadQt-9e4a58cd4fc2e041ec311b471508abbb65179339.zip
Qt-9e4a58cd4fc2e041ec311b471508abbb65179339.tar.gz
Qt-9e4a58cd4fc2e041ec311b471508abbb65179339.tar.bz2
Clarified iterator semantic in documentation and added a code snippet to a QML signal handler.
Reviewed by: David Boddie Tasks:QTBUG-13243, QTBUG-11779
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativetext.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativetext.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp
index f16af88..83098ae 100644
--- a/src/declarative/graphicsitems/qdeclarativetext.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetext.cpp
@@ -1208,6 +1208,16 @@ void QDeclarativeText::mousePressEvent(QGraphicsSceneMouseEvent *event)
\qmlsignal Text::onLinkActivated(link)
This handler is called when the user clicks on a link embedded in the text.
+ The link must be in rich text or HTML format and the
+ \a link string provides access to the particular link.
+
+ \snippet doc/src/snippets/declarative/text/onLinkActivated.qml 0
+
+ The example code will display the text
+ "The main website is at \l{http://qt.nokia.com}{Nokia Qt DF}."
+
+ Clicking on the highlighted link will output
+ \tt{http://qt.nokia.com link activated} to the console.
*/
/*!