aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/folderlistmodel
diff options
context:
space:
mode:
authorSze Howe Koh <szehowe.koh@gmail.com>2013-05-15 21:16:31 +0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-16 18:03:04 +0200
commitec68450161ca7ce7c3d9bc531bdcda1d14eb12e9 (patch)
treea23fa9eed262ab4b9b8a8c33992e5092a16c5c54 /src/imports/folderlistmodel
parent116a9893f1f333ee7a06d14d7a285345887b6eb3 (diff)
Doc: Inline a short snippet
An indirect way of fixing a broken snippet path. The entire (but very short) file is included as a snippet in only one place, and the license text takes far more space than the snippet. Change-Id: I6f4bf588b8701b655d418a71f83a2f9263d6b532 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'src/imports/folderlistmodel')
-rw-r--r--src/imports/folderlistmodel/qquickfolderlistmodel.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp
index 421e215066..7ba2981a4e 100644
--- a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp
+++ b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp
@@ -279,7 +279,27 @@ QString QQuickFolderListModelPrivate::resolvePath(const QUrl &path)
The following example shows a FolderListModel being used to provide a list
of QML files in a \l ListView:
- \snippet qml/folderlistmodel.qml 0
+ \qml
+ import QtQuick 2.0
+ import Qt.labs.folderlistmodel 1.0
+
+ ListView {
+ width: 200; height: 400
+
+ FolderListModel {
+ id: folderModel
+ nameFilters: ["*.qml"]
+ }
+
+ Component {
+ id: fileDelegate
+ Text { text: fileName }
+ }
+
+ model: folderModel
+ delegate: fileDelegate
+ }
+ \endqml
\section1 Path Separators