/usr/share/qt5/doc/qtquickdialogs/qml-qtquick-dialogs-filedialog.html is in qtdeclarative5-doc-html 5.2.1-3ubuntu15.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qquickplatformfiledialog.cpp -->
<title>FileDialog | QtQuickDialogs 5.2</title>
<link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
<div class="main">
<div class="main-rounded">
<div class="navigationbar">
<ul>
<li>Qt 5.2</li>
<li><a href="qtquickdialogs-index.html">Qt Quick Dialogs</a></li>
<li><a href="qtquick-dialogs-qmlmodule.html">QML Types</a></li>
<li>FileDialog</li>
<li id="buildversion">
Qt 5.2.1 Reference Documentation</li>
</ul>
</div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#methods">Methods</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">FileDialog</h1>
<span class="subtitle"></span>
<!-- $$$FileDialog-brief -->
<p>Dialog component for choosing files from a local filesystem. <a href="#details">More...</a></p>
<!-- @@@FileDialog -->
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> </b><tt>import QtQuick.Dialogs 1.1</tt></td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign"> Qt 5.1</td></tr></table><ul>
<li><a href="qml-qtquick-dialogs-filedialog-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="properties"></a>
<h2>Properties</h2>
<ul>
<li class="fn"><b><b><a href="qml-qtquick-dialogs-filedialog.html#fileUrl-prop">fileUrl</a></b></b> : url</li>
<li class="fn"><b><b><a href="qml-qtquick-dialogs-filedialog.html#fileUrls-prop">fileUrls</a></b></b> : list<url></li>
<li class="fn"><b><b><a href="qml-qtquick-dialogs-filedialog.html#folder-prop">folder</a></b></b> : url</li>
<li class="fn"><b><b><a href="qml-qtquick-dialogs-filedialog.html#modality-prop">modality</a></b></b> : Qt::WindowModality</li>
<li class="fn"><b><b><a href="qml-qtquick-dialogs-filedialog.html#nameFilters-prop">nameFilters</a></b></b> : list<string></li>
<li class="fn"><b><b><a href="qml-qtquick-dialogs-filedialog.html#selectExisting-prop">selectExisting</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-dialogs-filedialog.html#selectFolder-prop">selectFolder</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-dialogs-filedialog.html#selectMultiple-prop">selectMultiple</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-dialogs-filedialog.html#selectedNameFilter-prop">selectedNameFilter</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-qtquick-dialogs-filedialog.html#title-prop">title</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-qtquick-dialogs-filedialog.html#visible-prop">visible</a></b></b> : bool</li>
</ul>
<a name="methods"></a>
<h2>Methods</h2>
<ul>
<li class="fn">void <b><b><a href="qml-qtquick-dialogs-filedialog.html#close-method">close</a></b></b>()</li>
<li class="fn">void <b><b><a href="qml-qtquick-dialogs-filedialog.html#open-method">open</a></b></b>()</li>
</ul>
<!-- $$$FileDialog-description -->
<a name="details"></a>
<h2>Detailed Description</h2>
<p>FileDialog provides a basic file chooser: it allows the user to select existing files and/or directories, or create new filenames. The dialog is initially invisible. You need to set the properties as desired first, then set <a href="qml-qtquick-dialogs-filedialog.html#visible-prop">visible</a> to true or call <a href="qml-qtquick-dialogs-filedialog.html#open-method">open()</a>.</p>
<p>Here is a minimal example to open a file dialog and exit after the user chooses a file:</p>
<pre class="qml">import QtQuick 2.1
import QtQuick.Dialogs 1.0
<span class="type">FileDialog</span> {
<span class="name">id</span>: <span class="name">fileDialog</span>
<span class="name">title</span>: <span class="string">"Please choose a file"</span>
<span class="name">onAccepted</span>: {
<span class="name">console</span>.<span class="name">log</span>(<span class="string">"You chose: "</span> <span class="operator">+</span> <span class="name">fileDialog</span>.<span class="name">fileUrls</span>)
<span class="name">Qt</span>.<span class="name">quit</span>()
}
<span class="name">onRejected</span>: {
<span class="name">console</span>.<span class="name">log</span>(<span class="string">"Canceled"</span>)
<span class="name">Qt</span>.<span class="name">quit</span>()
}
<span class="name">Component</span>.onCompleted: <span class="name">visible</span> <span class="operator">=</span> <span class="number">true</span>
}</pre>
<p>A FileDialog window is automatically transient for its parent window. So whether you declare the dialog inside an Item or inside a Window, the dialog will appear centered over the window containing the item, or over the Window that you declared.</p>
<p>The implementation of FileDialog will be a platform file dialog if possible. If that isn't possible, then it will try to instantiate a QFileDialog. If that also isn't possible, then it will fall back to a QML implementation, DefaultFileDialog.qml. In that case you can customize the appearance by editing this file. DefaultFileDialog.qml contains a Rectangle to hold the dialog's contents, because certain embedded systems do not support multiple top-level windows. When the dialog becomes visible, it will automatically be wrapped in a Window if possible, or simply reparented on top of the main window if there can only be one window.</p>
<!-- @@@FileDialog -->
<h2>Property Documentation</h2>
<!-- $$$fileUrl -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="fileUrl-prop"></a><span class="name">fileUrl</span> : <span class="type">url</span></p></td></tr></table></div><div class="qmldoc"><p>The path of the file which was selected by the user.</p>
<p><b>Note: </b>This property is set only if exactly one file was selected. In all other cases, it will be empty.</p><p><b>See also </b><a href="qml-qtquick-dialogs-filedialog.html#fileUrls-prop">fileUrls</a>.</p>
</div></div><!-- @@@fileUrl -->
<br/>
<!-- $$$fileUrls -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="fileUrls-prop"></a><span class="name">fileUrls</span> : <span class="type">list</span><<span class="type">url</span>></p></td></tr></table></div><div class="qmldoc"><p>The list of file paths which were selected by the user.</p>
</div></div><!-- @@@fileUrls -->
<br/>
<!-- $$$folder -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="folder-prop"></a><span class="name">folder</span> : <span class="type">url</span></p></td></tr></table></div><div class="qmldoc"><p>The path to the currently selected folder. Setting this property before invoking <a href="qml-qtquick-dialogs-filedialog.html#open-method">open()</a> will cause the file browser to be initially positioned on the specified folder.</p>
<p>The value of this property is also updated after the dialog is closed.</p>
<p>By default, this property is false.</p>
</div></div><!-- @@@folder -->
<br/>
<!-- $$$modality -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="modality-prop"></a><span class="name">modality</span> : <span class="type">Qt::WindowModality</span></p></td></tr></table></div><div class="qmldoc"><p>Whether the dialog should be shown modal with respect to the window containing the dialog's parent Item, modal with respect to the whole application, or non-modal.</p>
<p>By default it is <tt>Qt.WindowModal</tt>.</p>
<p>Modality does not mean that there are any blocking calls to wait for the dialog to be accepted or rejected; it's only that the user will be prevented from interacting with the parent window and/or the application windows at the same time. You probably need to write an onAccepted handler to actually load or save the chosen file.</p>
</div></div><!-- @@@modality -->
<br/>
<!-- $$$nameFilters -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="nameFilters-prop"></a><span class="name">nameFilters</span> : <span class="type">list</span><<span class="type">string</span>></p></td></tr></table></div><div class="qmldoc"><p>A list of strings to be used as file name filters. Each string can be a space-separated list of filters; filters may include the ? and * wildcards. The list of filters can also be enclosed in parentheses and a textual description of the filter can be provided.</p>
<p>For example:</p>
<pre class="qml"><span class="type"><a href="qml-qtquick-dialogs-filedialog.html">FileDialog</a></span> {
<span class="name">nameFilters</span>: [ <span class="string">"Image files (*.jpg *.png)"</span>, <span class="string">"All files (*)"</span> ]
}</pre>
<p><b>Note: </b>Directories are not excluded by filters.</p><p><b>See also </b><a href="qml-qtquick-dialogs-filedialog.html#selectedNameFilter-prop">selectedNameFilter</a>.</p>
</div></div><!-- @@@nameFilters -->
<br/>
<!-- $$$selectExisting -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="selectExisting-prop"></a><span class="name">selectExisting</span> : <span class="type">bool</span></p></td></tr></table></div><div class="qmldoc"><p>Whether only existing files or directories can be selected.</p>
<p>By default, this property is true. This property must be set to the desired value before opening the dialog. Setting this property to false implies that the dialog is for naming a file to which to save something, or naming a folder to be created; therefore <a href="qml-qtquick-dialogs-filedialog.html#selectMultiple-prop">selectMultiple</a> must be false.</p>
</div></div><!-- @@@selectExisting -->
<br/>
<!-- $$$selectFolder -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="selectFolder-prop"></a><span class="name">selectFolder</span> : <span class="type">bool</span></p></td></tr></table></div><div class="qmldoc"><p>Whether the selected item should be a folder.</p>
<p>By default, this property is false. This property must be set to the desired value before opening the dialog. Setting this property to true implies that <a href="qml-qtquick-dialogs-filedialog.html#selectMultiple-prop">selectMultiple</a> must be false and <a href="qml-qtquick-dialogs-filedialog.html#selectExisting-prop">selectExisting</a> must be true.</p>
</div></div><!-- @@@selectFolder -->
<br/>
<!-- $$$selectMultiple -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="selectMultiple-prop"></a><span class="name">selectMultiple</span> : <span class="type">bool</span></p></td></tr></table></div><div class="qmldoc"><p>Whether more than one filename can be selected.</p>
<p>By default, this property is false. This property must be set to the desired value before opening the dialog. Setting this property to true implies that <a href="qml-qtquick-dialogs-filedialog.html#selectExisting-prop">selectExisting</a> must be true.</p>
</div></div><!-- @@@selectMultiple -->
<br/>
<!-- $$$selectedNameFilter -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="selectedNameFilter-prop"></a><span class="name">selectedNameFilter</span> : <span class="type">string</span></p></td></tr></table></div><div class="qmldoc"><p>Which of the <a href="qml-qtquick-dialogs-filedialog.html#nameFilters-prop">nameFilters</a> is currently selected.</p>
<p>This property can be set before the dialog is visible, to set the default name filter, and can also be set while the dialog is visible to set the current name filter. It is also updated when the user selects a different filter.</p>
</div></div><!-- @@@selectedNameFilter -->
<br/>
<!-- $$$title -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="title-prop"></a><span class="name">title</span> : <span class="type">string</span></p></td></tr></table></div><div class="qmldoc"><p>The title of the dialog window.</p>
</div></div><!-- @@@title -->
<br/>
<!-- $$$visible -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="visible-prop"></a><span class="name">visible</span> : <span class="type">bool</span></p></td></tr></table></div><div class="qmldoc"><p>This property holds whether the dialog is visible. By default this is false.</p>
<p><b>See also </b><a href="qml-qtquick-dialogs-filedialog.html#modality-prop">modality</a>.</p>
</div></div><!-- @@@visible -->
<br/>
<h2>Method Documentation</h2>
<!-- $$$close -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="close-method"></a><span class="type">void</span> <span class="name">close</span>()</p></td></tr></table></div><div class="qmldoc"><p>Closes the dialog.</p>
</div></div><!-- @@@close -->
<br/>
<!-- $$$open -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="open-method"></a><span class="type">void</span> <span class="name">open</span>()</p></td></tr></table></div><div class="qmldoc"><p>Shows the dialog to the user. It is equivalent to setting <a href="qml-qtquick-dialogs-filedialog.html#visible-prop">visible</a> to true.</p>
</div></div><!-- @@@open -->
<br/>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2013 Digia Plc and/or its
subsidiaries. Documentation contributions included herein are the copyrights of
their respective owners.<br> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br> Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners. </p>
</div>
</body>
</html>
|