diff options
author | Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> | 2015-01-12 14:35:39 +0100 |
---|---|---|
committer | Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> | 2015-01-22 11:03:55 +0100 |
commit | 0b30136b0ea55b1532ca6eca9bfed8c21c96aa41 (patch) | |
tree | 21ba4982d7fb8f9831cbbf17f03af09ca782c40f /src/libs/installer/scriptengine.cpp | |
parent | ed7e4ef5cd4442f3f02169e15f7977a6cd0c7f53 (diff) |
Doc: add docs for QFileDialog JavaScript object
Based on Qt reference docs for QFileDialog.
Change-Id: Ic56fd5a48b290608f7810bc8f9260367389c5896
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Diffstat (limited to 'src/libs/installer/scriptengine.cpp')
-rw-r--r-- | src/libs/installer/scriptengine.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/libs/installer/scriptengine.cpp b/src/libs/installer/scriptengine.cpp index 85b9be79f..73cfa4d6e 100644 --- a/src/libs/installer/scriptengine.cpp +++ b/src/libs/installer/scriptengine.cpp @@ -83,14 +83,46 @@ namespace QInstaller { /*! \qmltype QFileDialog \inqmlmodule scripting + \brief Provides a dialog that allows users to select files or directories. + + Use the QFileDialog::getExistingDirectory() method to create a modal dialog + that displays an existing directory selected by the user. Use the + QFileDialog::getOpenFileName() method to create a dialog that displays + matching files in the directory selected by the user. */ /*! \qmlmethod string QFileDialog::getExistingDirectory(string caption, string dir) + + Returns an existing directory selected by the user. + + The dialog's working directory is set to \a dir, and the caption is set to + \a caption. Either of these may be an empty string, in which case the + current directory and a default caption will be used, respectively. */ /*! \qmlmethod string QFileDialog::getOpenFileName(string caption, string dir, string filter) + + Returns an existing file selected by the user. If the user selects + \uicontrol Cancel, returns a null string. + + The file dialog's caption is set to \a caption. If \c caption is not + specified, a default caption is used. + + The file dialog's working directory is set to \a dir. If \c dir includes a + file name, the file will be selected. Only files that match the specified + \a filter are shown. Either of these may be an empty string. + + To specify multiple filters, separate them with two semicolons (;;). For + example: + + \code + "Images (*.png *.xpm *.jpg);;Text files (*.txt);;XML files (*.xml)" + \endcode + + On Windows, and OS X, this static function will use the native file dialog + and not a QFileDialog. */ /*! |