summaryrefslogtreecommitdiffstats
path: root/examples/widgets
diff options
context:
space:
mode:
authorNico Vertriest <nico.vertriest@qt.io>2017-12-12 13:30:32 +0100
committerNico Vertriest <nico.vertriest@qt.io>2018-03-13 12:08:13 +0000
commit0daa14e1912b07c40833f3dc3e34f8e6c579eedb (patch)
tree7c75077513385c136a60b544e56c43aa1efee008 /examples/widgets
parente9dc2f1783d2e4914b156eabafc50f1156f1d1c5 (diff)
Doc: complete Dir View Example
- add updated screenshot - add basic doc to example code Change-Id: Iad616b285ee1470571adc38b868fcf8a0ed64840 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'examples/widgets')
-rw-r--r--examples/widgets/doc/src/dirview.qdoc36
1 files changed, 33 insertions, 3 deletions
diff --git a/examples/widgets/doc/src/dirview.qdoc b/examples/widgets/doc/src/dirview.qdoc
index 3d58553b8d..d9a16fa58d 100644
--- a/examples/widgets/doc/src/dirview.qdoc
+++ b/examples/widgets/doc/src/dirview.qdoc
@@ -31,8 +31,38 @@
\ingroup examples-itemviews
\brief This example demonstrates the usage of a tree view.
- \brief The Dir View example shows a tree view onto the local filing system. It uses the
- QFileSystemModel class to provide file and directory information.
+ The Dir View example shows a tree view of the local file
+ system. It uses the QFileSystemModel class to provide file
+ and directory information.
- \image dirview-example.png
+ \borderedimage dirview-example.png
+
+ The example supports a number of command line options.
+ These options include:
+ \list
+ \li Application description
+ \li -help option
+ \li -version option
+ \li if the optionc {-c} is specified, the application will not
+ use custom directory options
+ \endlist
+
+ \quotefromfile itemviews/dirview/main.cpp
+ \skipto QCommandLineParser parser
+ \printuntil parser.positionalArguments
+
+ Declares a QFileSystemModel as data model for viewing
+ the local file system. QFileSystem works with a cache, that is,
+ it is updated continually with QFileSystemWatcher on that folder.
+
+ \skipto QFileSystemModel
+ \printuntil tree.setModel
+
+ Creates a model/view implementation called \c tree
+ for viewing the filesystem.
+
+ \skipto tree.setAnimated(false)
+ \printuntil tree.setWindowTitle
+
+ Sets some formatting options for \c tree.
*/