aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-08-24 15:41:51 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-08-25 09:43:25 +0000
commitde488d3ccdb98c2820176192a78c00f08ccfd83c (patch)
tree4ab6cc6921f7155249fa78ab51ed6964ff235958
parent55a56fdaf5d2e1a4055abdac748c420ac6a8f2bf (diff)
Doc: add example snippet to FileDialog::nameFilters
Change-Id: Iac753e53ff838d232365c13b92e150d528daef2a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
-rw-r--r--src/imports/platform/qquickplatformfiledialog.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/imports/platform/qquickplatformfiledialog.cpp b/src/imports/platform/qquickplatformfiledialog.cpp
index 53f91b4c..6174fd99 100644
--- a/src/imports/platform/qquickplatformfiledialog.cpp
+++ b/src/imports/platform/qquickplatformfiledialog.cpp
@@ -308,6 +308,12 @@ void QQuickPlatformFileDialog::resetOptions()
This property holds the filters that restrict the types of files that
can be selected.
+ \code
+ FileDialog {
+ nameFilters: ["Text files (*.txt)", "HTML files (*.html *.htm)"]
+ }
+ \endcode
+
\note \b{*.*} is not a portable filter, because the historical assumption
that the file extension determines the file type is not consistent on every
operating system. It is possible to have a file with no dot in its name (for