summaryrefslogtreecommitdiffstats
path: root/examples/widgets/doc/editabletreemodel.qdoc
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2012-08-20 15:17:13 +0200
committerQt by Nokia <qt-info@nokia.com>2012-08-21 13:41:01 +0200
commit4410e66f455dd47a1de90dfd095849b9ecd32134 (patch)
treebc5f59f59468b05e5ebb86f22dc867d223a3d873 /examples/widgets/doc/editabletreemodel.qdoc
parented4389b055bd2a3b735fc846a27091b29e72a398 (diff)
Making trivial snippets inline
Change-Id: I8d8b5586579d3ee460b234b5a09462586ac1cfd0 Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@nokia.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Diffstat (limited to 'examples/widgets/doc/editabletreemodel.qdoc')
-rw-r--r--examples/widgets/doc/editabletreemodel.qdoc8
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/widgets/doc/editabletreemodel.qdoc b/examples/widgets/doc/editabletreemodel.qdoc
index 423b9cee94..24745b77b8 100644
--- a/examples/widgets/doc/editabletreemodel.qdoc
+++ b/examples/widgets/doc/editabletreemodel.qdoc
@@ -132,14 +132,18 @@
In the case shown in the diagram, the piece of information represented
by \b{a} can be obtained using the standard model/view API:
- \snippet doc/src/snippets/code/doc_src_examples_editabletreemodel.cpp 0
+ \code
+ QVariant a = model->index(0, 0, QModelIndex()).data();
+ \endcode
Since each items holds pieces of data for each column in a given row,
there can be many model indexes that map to the same \c TreeItem object.
For example, the information represented by \b{b} can be obtained
using the following code:
- \snippet doc/src/snippets/code/doc_src_examples_editabletreemodel.cpp 1
+ \code
+ QVariant b = model->index(1, 0, QModelIndex()).data();
+ \endcode
The same underlying \c TreeItem would be accessed to obtain information
for the other model indexes in the same row as \b{b}.