From 0daa14e1912b07c40833f3dc3e34f8e6c579eedb Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Tue, 12 Dec 2017 13:30:32 +0100 Subject: Doc: complete Dir View Example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - add updated screenshot - add basic doc to example code Change-Id: Iad616b285ee1470571adc38b868fcf8a0ed64840 Reviewed-by: Topi Reiniƶ --- examples/widgets/doc/src/dirview.qdoc | 36 ++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) (limited to 'examples/widgets/doc') 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. */ -- cgit v1.2.3