[][src]Struct qt_widgets::QFileDialog

#[repr(C)]pub struct QFileDialog { /* fields omitted */ }

The QFileDialog class provides a dialog that allow users to select files or directories.

C++ class: QFileDialog.

C++ documentation:

The QFileDialog class provides a dialog that allow users to select files or directories.

The QFileDialog class enables a user to traverse the file system in order to select one or many files or a directory.

The easiest way to create a QFileDialog is to use the static functions.

fileName = QFileDialog::getOpenFileName(this, tr("Open Image"), "/home/jana", tr("Image Files (*.png *.jpg *.bmp)"));

In the above example, a modal QFileDialog is created using a static function. The dialog initially displays the contents of the "/home/jana" directory, and displays files matching the patterns given in the string "Image Files (*.png *.jpg *.bmp)". The parent of the file dialog is set to this, and the window title is set to "Open Image".

If you want to use multiple filters, separate each one with two semicolons. For example:

"Images (*.png .xpm .jpg);;Text files (.txt);;XML files (.xml)"

You can create your own QFileDialog without using the static functions. By calling setFileMode(), you can specify what the user must select in the dialog:

QFileDialog dialog(this); dialog.setFileMode(QFileDialog::AnyFile);

In the above example, the mode of the file dialog is set to AnyFile, meaning that the user can select any file, or even specify a file that doesn't exist. This mode is useful for creating a "Save As" file dialog. Use ExistingFile if the user must select an existing file, or Directory if only a directory may be selected. See the QFileDialog::FileMode enum for the complete list of modes.

The fileMode property contains the mode of operation for the dialog; this indicates what types of objects the user is expected to select. Use setNameFilter() to set the dialog's file filter. For example:

dialog.setNameFilter(tr("Images (*.png *.xpm *.jpg)"));

In the above example, the filter is set to "Images (*.png *.xpm *.jpg)", this means that only files with the extension png, xpm, or jpg will be shown in the QFileDialog. You can apply several filters by using setNameFilters(). Use selectNameFilter() to select one of the filters you've given as the file dialog's default filter.

The file dialog has two view modes: List and Detail. List presents the contents of the current directory as a list of file and directory names. Detail also displays a list of file and directory names, but provides additional information alongside each name, such as the file size and modification date. Set the mode with setViewMode():

dialog.setViewMode(QFileDialog::Detail);

The last important function you will need to use when creating your own file dialog is selectedFiles().

QStringList fileNames; if (dialog.exec()) fileNames = dialog.selectedFiles();

In the above example, a modal file dialog is created and shown. If the user clicked OK, the file they selected is put in fileName.

The dialog's working directory can be set with setDirectory(). Each file in the current directory can be selected using the selectFile() function.

The Standard Dialogs example shows how to use QFileDialog as well as other built-in Qt dialogs.

By default, a platform-native file dialog will be used if the platform has one. In that case, the widgets which would otherwise be used to construct the dialog will not be instantiated, so related accessors such as layout() and itemDelegate() will return null. You can set the DontUseNativeDialog option to ensure that the widget-based implementation will be used instead of the native dialog.

Methods

impl QFileDialog[src]

pub fn file_selected(&self) -> Signal<(*const QString,)>[src]

When the selection changes for local operations and the dialog is accepted, this signal is emitted with the (possibly empty) selected file.

Returns a built-in Qt signal QFileDialog::fileSelected that can be passed to qt_core::Signal::connect.

C++ documentation:

When the selection changes for local operations and the dialog is accepted, this signal is emitted with the (possibly empty) selected file.

See also currentChanged() and QDialog::Accepted.

pub fn files_selected(&self) -> Signal<(*const QStringList,)>[src]

When the selection changes for local operations and the dialog is accepted, this signal is emitted with the (possibly empty) list of selected files.

Returns a built-in Qt signal QFileDialog::filesSelected that can be passed to qt_core::Signal::connect.

C++ documentation:

When the selection changes for local operations and the dialog is accepted, this signal is emitted with the (possibly empty) list of selected files.

See also currentChanged() and QDialog::Accepted.

pub fn current_changed(&self) -> Signal<(*const QString,)>[src]

When the current file changes for local operations, this signal is emitted with the new file name as the path parameter.

Returns a built-in Qt signal QFileDialog::currentChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

When the current file changes for local operations, this signal is emitted with the new file name as the path parameter.

See also filesSelected().

pub fn directory_entered(&self) -> Signal<(*const QString,)>[src]

This signal is emitted for local operations when the user enters a directory.

Returns a built-in Qt signal QFileDialog::directoryEntered that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted for local operations when the user enters a directory.

This function was introduced in Qt 4.3.

pub fn url_selected(&self) -> Signal<(*const QUrl,)>[src]

When the selection changes and the dialog is accepted, this signal is emitted with the (possibly empty) selected url.

Returns a built-in Qt signal QFileDialog::urlSelected that can be passed to qt_core::Signal::connect.

C++ documentation:

When the selection changes and the dialog is accepted, this signal is emitted with the (possibly empty) selected url.

This function was introduced in Qt 5.2.

See also currentUrlChanged() and QDialog::Accepted.

pub fn urls_selected(&self) -> Signal<(*const QListOfQUrl,)>[src]

When the selection changes and the dialog is accepted, this signal is emitted with the (possibly empty) list of selected urls.

Returns a built-in Qt signal QFileDialog::urlsSelected that can be passed to qt_core::Signal::connect.

C++ documentation:

When the selection changes and the dialog is accepted, this signal is emitted with the (possibly empty) list of selected urls.

This function was introduced in Qt 5.2.

See also currentUrlChanged() and QDialog::Accepted.

pub fn current_url_changed(&self) -> Signal<(*const QUrl,)>[src]

When the current file changes, this signal is emitted with the new file URL as the url parameter.

Returns a built-in Qt signal QFileDialog::currentUrlChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

When the current file changes, this signal is emitted with the new file URL as the url parameter.

This function was introduced in Qt 5.2.

See also urlsSelected().

pub fn directory_url_entered(&self) -> Signal<(*const QUrl,)>[src]

This signal is emitted when the user enters a directory.

Returns a built-in Qt signal QFileDialog::directoryUrlEntered that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the user enters a directory.

This function was introduced in Qt 5.2.

pub fn filter_selected(&self) -> Signal<(*const QString,)>[src]

This signal is emitted when the user selects a filter.

Returns a built-in Qt signal QFileDialog::filterSelected that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the user selects a filter.

This function was introduced in Qt 4.3.

pub unsafe fn accept_mode(&self) -> AcceptMode[src]

This property holds the accept mode of the dialog

Calls C++ function: QFileDialog::AcceptMode QFileDialog::acceptMode() const.

C++ documentation:

This property holds the accept mode of the dialog

The action mode defines whether the dialog is for opening or saving files.

By default, this property is set to AcceptOpen.

Access functions:

AcceptMode acceptMode() const
void setAcceptMode(AcceptMode mode)

See also AcceptMode.

pub unsafe fn confirm_overwrite(&self) -> bool[src]

This property holds whether the filedialog should ask before accepting a selected file, when the accept mode is AcceptSave

Calls C++ function: bool QFileDialog::confirmOverwrite() const.

C++ documentation:

This property holds whether the filedialog should ask before accepting a selected file, when the accept mode is AcceptSave

Use setOption(DontConfirmOverwrite, !enabled) or !testOption(DontConfirmOverwrite) instead.

Access functions:

bool confirmOverwrite() const
void setConfirmOverwrite(bool enabled)

pub unsafe fn default_suffix(&self) -> CppBox<QString>[src]

suffix added to the filename if no other suffix was specified

Calls C++ function: QString QFileDialog::defaultSuffix() const.

C++ documentation:

suffix added to the filename if no other suffix was specified

This property specifies a string that will be added to the filename if it has no suffix already. The suffix is typically used to indicate the file type (e.g. "txt" indicates a text file).

If the first character is a dot ('.'), it is removed.

Access functions:

QString defaultSuffix() const
void setDefaultSuffix(const QString &suffix)

pub unsafe fn directory(&self) -> CppBox<QDir>[src]

Returns the directory currently being displayed in the dialog.

Calls C++ function: QDir QFileDialog::directory() const.

C++ documentation:

Returns the directory currently being displayed in the dialog.

See also setDirectory().

pub unsafe fn directory_url(&self) -> CppBox<QUrl>[src]

Returns the url of the directory currently being displayed in the dialog.

Calls C++ function: QUrl QFileDialog::directoryUrl() const.

C++ documentation:

Returns the url of the directory currently being displayed in the dialog.

This function was introduced in Qt 5.2.

See also setDirectoryUrl().

pub unsafe fn file_mode(&self) -> FileMode[src]

This property holds the file mode of the dialog

Calls C++ function: QFileDialog::FileMode QFileDialog::fileMode() const.

C++ documentation:

This property holds the file mode of the dialog

The file mode defines the number and type of items that the user is expected to select in the dialog.

By default, this property is set to AnyFile.

This function will set the labels for the FileName and Accept DialogLabels. It is possible to set custom text after the call to setFileMode().

Access functions:

FileMode fileMode() const
void setFileMode(FileMode mode)

See also FileMode.

pub unsafe fn filter(&self) -> QFlags<Filter>[src]

Returns the filter that is used when displaying files.

Calls C++ function: QFlags<QDir::Filter> QFileDialog::filter() const.

C++ documentation:

Returns the filter that is used when displaying files.

This function was introduced in Qt 4.4.

See also setFilter().

pub unsafe fn get_existing_directory_4a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QString>>,
    options: QFlags<Option>
) -> CppBox<QString>
[src]

This is a convenience static function that will return an existing directory selected by the user.

Calls C++ function: static QString QFileDialog::getExistingDirectory(QWidget* parent = …, const QString& caption = …, const QString& dir = …, QFlags<QFileDialog::Option> options = …).

C++ documentation:

This is a convenience static function that will return an existing directory selected by the user.


  QString dir = QFileDialog::getExistingDirectory(this, tr("Open Directory"),
                                                  "/home",
                                                  QFileDialog::ShowDirsOnly
                                                  | QFileDialog::DontResolveSymlinks);

This function creates a modal file dialog with the given parent widget. If parent is not 0, the dialog will be shown centered over the parent widget.

The dialog's working directory is set to dir, and the caption is set to caption. Either of these may be an empty string in which case the current directory and a default caption will be used respectively.

The options argument holds various options about how to run the dialog, see the QFileDialog::Option enum for more information on the flags you can pass. To ensure a native file dialog, ShowDirsOnly must be set.

On Windows and macOS, this static function will use the native file dialog and not a QFileDialog. However, the native Windows file dialog does not support displaying files in the directory chooser. You need to pass DontUseNativeDialog to display files using a QFileDialog.

On Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, the file dialog will change to /var/tmp after entering /usr/tmp. If options includes DontResolveSymlinks, the file dialog will treat symlinks as regular directories.

On Windows, the dialog will spin a blocking modal event loop that will not dispatch any QTimers, and if parent is not 0 then it will position the dialog just below the parent's title bar.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFileDialog constructors.

See also getOpenFileName(), getOpenFileNames(), and getSaveFileName().

pub unsafe fn get_existing_directory_3a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QString>>
) -> CppBox<QString>
[src]

This is a convenience static function that will return an existing directory selected by the user.

Calls C++ function: static QString QFileDialog::getExistingDirectory(QWidget* parent = …, const QString& caption = …, const QString& dir = …).

C++ documentation:

This is a convenience static function that will return an existing directory selected by the user.


  QString dir = QFileDialog::getExistingDirectory(this, tr("Open Directory"),
                                                  "/home",
                                                  QFileDialog::ShowDirsOnly
                                                  | QFileDialog::DontResolveSymlinks);

This function creates a modal file dialog with the given parent widget. If parent is not 0, the dialog will be shown centered over the parent widget.

The dialog's working directory is set to dir, and the caption is set to caption. Either of these may be an empty string in which case the current directory and a default caption will be used respectively.

The options argument holds various options about how to run the dialog, see the QFileDialog::Option enum for more information on the flags you can pass. To ensure a native file dialog, ShowDirsOnly must be set.

On Windows and macOS, this static function will use the native file dialog and not a QFileDialog. However, the native Windows file dialog does not support displaying files in the directory chooser. You need to pass DontUseNativeDialog to display files using a QFileDialog.

On Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, the file dialog will change to /var/tmp after entering /usr/tmp. If options includes DontResolveSymlinks, the file dialog will treat symlinks as regular directories.

On Windows, the dialog will spin a blocking modal event loop that will not dispatch any QTimers, and if parent is not 0 then it will position the dialog just below the parent's title bar.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFileDialog constructors.

See also getOpenFileName(), getOpenFileNames(), and getSaveFileName().

pub unsafe fn get_existing_directory_2a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>
) -> CppBox<QString>
[src]

This is a convenience static function that will return an existing directory selected by the user.

Calls C++ function: static QString QFileDialog::getExistingDirectory(QWidget* parent = …, const QString& caption = …).

C++ documentation:

This is a convenience static function that will return an existing directory selected by the user.


  QString dir = QFileDialog::getExistingDirectory(this, tr("Open Directory"),
                                                  "/home",
                                                  QFileDialog::ShowDirsOnly
                                                  | QFileDialog::DontResolveSymlinks);

This function creates a modal file dialog with the given parent widget. If parent is not 0, the dialog will be shown centered over the parent widget.

The dialog's working directory is set to dir, and the caption is set to caption. Either of these may be an empty string in which case the current directory and a default caption will be used respectively.

The options argument holds various options about how to run the dialog, see the QFileDialog::Option enum for more information on the flags you can pass. To ensure a native file dialog, ShowDirsOnly must be set.

On Windows and macOS, this static function will use the native file dialog and not a QFileDialog. However, the native Windows file dialog does not support displaying files in the directory chooser. You need to pass DontUseNativeDialog to display files using a QFileDialog.

On Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, the file dialog will change to /var/tmp after entering /usr/tmp. If options includes DontResolveSymlinks, the file dialog will treat symlinks as regular directories.

On Windows, the dialog will spin a blocking modal event loop that will not dispatch any QTimers, and if parent is not 0 then it will position the dialog just below the parent's title bar.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFileDialog constructors.

See also getOpenFileName(), getOpenFileNames(), and getSaveFileName().

pub unsafe fn get_existing_directory_1a(
    parent: impl CastInto<Ptr<QWidget>>
) -> CppBox<QString>
[src]

This is a convenience static function that will return an existing directory selected by the user.

Calls C++ function: static QString QFileDialog::getExistingDirectory(QWidget* parent = …).

C++ documentation:

This is a convenience static function that will return an existing directory selected by the user.


  QString dir = QFileDialog::getExistingDirectory(this, tr("Open Directory"),
                                                  "/home",
                                                  QFileDialog::ShowDirsOnly
                                                  | QFileDialog::DontResolveSymlinks);

This function creates a modal file dialog with the given parent widget. If parent is not 0, the dialog will be shown centered over the parent widget.

The dialog's working directory is set to dir, and the caption is set to caption. Either of these may be an empty string in which case the current directory and a default caption will be used respectively.

The options argument holds various options about how to run the dialog, see the QFileDialog::Option enum for more information on the flags you can pass. To ensure a native file dialog, ShowDirsOnly must be set.

On Windows and macOS, this static function will use the native file dialog and not a QFileDialog. However, the native Windows file dialog does not support displaying files in the directory chooser. You need to pass DontUseNativeDialog to display files using a QFileDialog.

On Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, the file dialog will change to /var/tmp after entering /usr/tmp. If options includes DontResolveSymlinks, the file dialog will treat symlinks as regular directories.

On Windows, the dialog will spin a blocking modal event loop that will not dispatch any QTimers, and if parent is not 0 then it will position the dialog just below the parent's title bar.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFileDialog constructors.

See also getOpenFileName(), getOpenFileNames(), and getSaveFileName().

pub unsafe fn get_existing_directory_0a() -> CppBox<QString>[src]

This is a convenience static function that will return an existing directory selected by the user.

Calls C++ function: static QString QFileDialog::getExistingDirectory().

C++ documentation:

This is a convenience static function that will return an existing directory selected by the user.


  QString dir = QFileDialog::getExistingDirectory(this, tr("Open Directory"),
                                                  "/home",
                                                  QFileDialog::ShowDirsOnly
                                                  | QFileDialog::DontResolveSymlinks);

This function creates a modal file dialog with the given parent widget. If parent is not 0, the dialog will be shown centered over the parent widget.

The dialog's working directory is set to dir, and the caption is set to caption. Either of these may be an empty string in which case the current directory and a default caption will be used respectively.

The options argument holds various options about how to run the dialog, see the QFileDialog::Option enum for more information on the flags you can pass. To ensure a native file dialog, ShowDirsOnly must be set.

On Windows and macOS, this static function will use the native file dialog and not a QFileDialog. However, the native Windows file dialog does not support displaying files in the directory chooser. You need to pass DontUseNativeDialog to display files using a QFileDialog.

On Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, the file dialog will change to /var/tmp after entering /usr/tmp. If options includes DontResolveSymlinks, the file dialog will treat symlinks as regular directories.

On Windows, the dialog will spin a blocking modal event loop that will not dispatch any QTimers, and if parent is not 0 then it will position the dialog just below the parent's title bar.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFileDialog constructors.

See also getOpenFileName(), getOpenFileNames(), and getSaveFileName().

pub unsafe fn get_existing_directory_url_5a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QUrl>>,
    options: QFlags<Option>,
    supported_schemes: impl CastInto<Ref<QStringList>>
) -> CppBox<QUrl>
[src]

This is a convenience static function that will return an existing directory selected by the user. If the user presses Cancel, it returns an empty url.

Calls C++ function: static QUrl QFileDialog::getExistingDirectoryUrl(QWidget* parent = …, const QString& caption = …, const QUrl& dir = …, QFlags<QFileDialog::Option> options = …, const QStringList& supportedSchemes = …).

C++ documentation:

This is a convenience static function that will return an existing directory selected by the user. If the user presses Cancel, it returns an empty url.

The function is used similarly to QFileDialog::getExistingDirectory(). In particular parent, caption, dir and options are used in the exact same way.

The main difference with QFileDialog::getExistingDirectory() comes from the ability offered to the user to select a remote directory. That's why the return type and the type of dir is QUrl.

The supportedSchemes argument allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to fetch the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

When possible, this static function will use the native file dialog and not a QFileDialog. On platforms which don't support selecting remote files, Qt will allow to select only local files.

This function was introduced in Qt 5.2.

See also getExistingDirectory(), getOpenFileUrl(), getOpenFileUrls(), and getSaveFileUrl().

pub unsafe fn get_existing_directory_url_4a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QUrl>>,
    options: QFlags<Option>
) -> CppBox<QUrl>
[src]

This is a convenience static function that will return an existing directory selected by the user. If the user presses Cancel, it returns an empty url.

Calls C++ function: static QUrl QFileDialog::getExistingDirectoryUrl(QWidget* parent = …, const QString& caption = …, const QUrl& dir = …, QFlags<QFileDialog::Option> options = …).

C++ documentation:

This is a convenience static function that will return an existing directory selected by the user. If the user presses Cancel, it returns an empty url.

The function is used similarly to QFileDialog::getExistingDirectory(). In particular parent, caption, dir and options are used in the exact same way.

The main difference with QFileDialog::getExistingDirectory() comes from the ability offered to the user to select a remote directory. That's why the return type and the type of dir is QUrl.

The supportedSchemes argument allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to fetch the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

When possible, this static function will use the native file dialog and not a QFileDialog. On platforms which don't support selecting remote files, Qt will allow to select only local files.

This function was introduced in Qt 5.2.

See also getExistingDirectory(), getOpenFileUrl(), getOpenFileUrls(), and getSaveFileUrl().

pub unsafe fn get_existing_directory_url_3a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QUrl>>
) -> CppBox<QUrl>
[src]

This is a convenience static function that will return an existing directory selected by the user. If the user presses Cancel, it returns an empty url.

Calls C++ function: static QUrl QFileDialog::getExistingDirectoryUrl(QWidget* parent = …, const QString& caption = …, const QUrl& dir = …).

C++ documentation:

This is a convenience static function that will return an existing directory selected by the user. If the user presses Cancel, it returns an empty url.

The function is used similarly to QFileDialog::getExistingDirectory(). In particular parent, caption, dir and options are used in the exact same way.

The main difference with QFileDialog::getExistingDirectory() comes from the ability offered to the user to select a remote directory. That's why the return type and the type of dir is QUrl.

The supportedSchemes argument allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to fetch the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

When possible, this static function will use the native file dialog and not a QFileDialog. On platforms which don't support selecting remote files, Qt will allow to select only local files.

This function was introduced in Qt 5.2.

See also getExistingDirectory(), getOpenFileUrl(), getOpenFileUrls(), and getSaveFileUrl().

pub unsafe fn get_existing_directory_url_2a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>
) -> CppBox<QUrl>
[src]

This is a convenience static function that will return an existing directory selected by the user. If the user presses Cancel, it returns an empty url.

Calls C++ function: static QUrl QFileDialog::getExistingDirectoryUrl(QWidget* parent = …, const QString& caption = …).

C++ documentation:

This is a convenience static function that will return an existing directory selected by the user. If the user presses Cancel, it returns an empty url.

The function is used similarly to QFileDialog::getExistingDirectory(). In particular parent, caption, dir and options are used in the exact same way.

The main difference with QFileDialog::getExistingDirectory() comes from the ability offered to the user to select a remote directory. That's why the return type and the type of dir is QUrl.

The supportedSchemes argument allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to fetch the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

When possible, this static function will use the native file dialog and not a QFileDialog. On platforms which don't support selecting remote files, Qt will allow to select only local files.

This function was introduced in Qt 5.2.

See also getExistingDirectory(), getOpenFileUrl(), getOpenFileUrls(), and getSaveFileUrl().

pub unsafe fn get_existing_directory_url_1a(
    parent: impl CastInto<Ptr<QWidget>>
) -> CppBox<QUrl>
[src]

This is a convenience static function that will return an existing directory selected by the user. If the user presses Cancel, it returns an empty url.

Calls C++ function: static QUrl QFileDialog::getExistingDirectoryUrl(QWidget* parent = …).

C++ documentation:

This is a convenience static function that will return an existing directory selected by the user. If the user presses Cancel, it returns an empty url.

The function is used similarly to QFileDialog::getExistingDirectory(). In particular parent, caption, dir and options are used in the exact same way.

The main difference with QFileDialog::getExistingDirectory() comes from the ability offered to the user to select a remote directory. That's why the return type and the type of dir is QUrl.

The supportedSchemes argument allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to fetch the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

When possible, this static function will use the native file dialog and not a QFileDialog. On platforms which don't support selecting remote files, Qt will allow to select only local files.

This function was introduced in Qt 5.2.

See also getExistingDirectory(), getOpenFileUrl(), getOpenFileUrls(), and getSaveFileUrl().

pub unsafe fn get_existing_directory_url_0a() -> CppBox<QUrl>[src]

This is a convenience static function that will return an existing directory selected by the user. If the user presses Cancel, it returns an empty url.

Calls C++ function: static QUrl QFileDialog::getExistingDirectoryUrl().

C++ documentation:

This is a convenience static function that will return an existing directory selected by the user. If the user presses Cancel, it returns an empty url.

The function is used similarly to QFileDialog::getExistingDirectory(). In particular parent, caption, dir and options are used in the exact same way.

The main difference with QFileDialog::getExistingDirectory() comes from the ability offered to the user to select a remote directory. That's why the return type and the type of dir is QUrl.

The supportedSchemes argument allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to fetch the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

When possible, this static function will use the native file dialog and not a QFileDialog. On platforms which don't support selecting remote files, Qt will allow to select only local files.

This function was introduced in Qt 5.2.

See also getExistingDirectory(), getOpenFileUrl(), getOpenFileUrls(), and getSaveFileUrl().

pub unsafe fn get_open_file_name_6a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QString>>,
    filter: impl CastInto<Ref<QString>>,
    selected_filter: impl CastInto<Ptr<QString>>,
    options: QFlags<Option>
) -> CppBox<QString>
[src]

This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns a null string.

Calls C++ function: static QString QFileDialog::getOpenFileName(QWidget* parent = …, const QString& caption = …, const QString& dir = …, const QString& filter = …, QString* selectedFilter = …, QFlags<QFileDialog::Option> options = …).

C++ documentation:

This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns a null string.


  QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"),
                                                  "/home",
                                                  tr("Images (*.png *.xpm *.jpg)"));

The function creates a modal file dialog with the given parent widget. If parent is not 0, the dialog will be shown centered over the parent widget.

The file dialog's working directory will be set to dir. If dir includes a file name, the file will be selected. Only files that match the given filter are shown. The filter selected is set to selectedFilter. The parameters dir, selectedFilter, and filter may be empty strings. If you want multiple filters, separate them with ';;', for example:

"Images (*.png .xpm .jpg);;Text files (.txt);;XML files (.xml)"

The options argument holds various options about how to run the dialog, see the QFileDialog::Option enum for more information on the flags you can pass.

The dialog's caption is set to caption. If caption is not specified then a default caption will be used.

On Windows, and macOS, this static function will use the native file dialog and not a QFileDialog.

On Windows the dialog will spin a blocking modal event loop that will not dispatch any QTimers, and if parent is not 0 then it will position the dialog just below the parent's title bar.

On Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, the file dialog will change to /var/tmp after entering /usr/tmp. If options includes DontResolveSymlinks, the file dialog will treat symlinks as regular directories.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFileDialog constructors.

See also getOpenFileNames(), getSaveFileName(), and getExistingDirectory().

pub unsafe fn get_open_file_name_5a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QString>>,
    filter: impl CastInto<Ref<QString>>,
    selected_filter: impl CastInto<Ptr<QString>>
) -> CppBox<QString>
[src]

This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns a null string.

Calls C++ function: static QString QFileDialog::getOpenFileName(QWidget* parent = …, const QString& caption = …, const QString& dir = …, const QString& filter = …, QString* selectedFilter = …).

C++ documentation:

This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns a null string.


  QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"),
                                                  "/home",
                                                  tr("Images (*.png *.xpm *.jpg)"));

The function creates a modal file dialog with the given parent widget. If parent is not 0, the dialog will be shown centered over the parent widget.

The file dialog's working directory will be set to dir. If dir includes a file name, the file will be selected. Only files that match the given filter are shown. The filter selected is set to selectedFilter. The parameters dir, selectedFilter, and filter may be empty strings. If you want multiple filters, separate them with ';;', for example:

"Images (*.png .xpm .jpg);;Text files (.txt);;XML files (.xml)"

The options argument holds various options about how to run the dialog, see the QFileDialog::Option enum for more information on the flags you can pass.

The dialog's caption is set to caption. If caption is not specified then a default caption will be used.

On Windows, and macOS, this static function will use the native file dialog and not a QFileDialog.

On Windows the dialog will spin a blocking modal event loop that will not dispatch any QTimers, and if parent is not 0 then it will position the dialog just below the parent's title bar.

On Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, the file dialog will change to /var/tmp after entering /usr/tmp. If options includes DontResolveSymlinks, the file dialog will treat symlinks as regular directories.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFileDialog constructors.

See also getOpenFileNames(), getSaveFileName(), and getExistingDirectory().

pub unsafe fn get_open_file_name_4a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QString>>,
    filter: impl CastInto<Ref<QString>>
) -> CppBox<QString>
[src]

This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns a null string.

Calls C++ function: static QString QFileDialog::getOpenFileName(QWidget* parent = …, const QString& caption = …, const QString& dir = …, const QString& filter = …).

C++ documentation:

This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns a null string.


  QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"),
                                                  "/home",
                                                  tr("Images (*.png *.xpm *.jpg)"));

The function creates a modal file dialog with the given parent widget. If parent is not 0, the dialog will be shown centered over the parent widget.

The file dialog's working directory will be set to dir. If dir includes a file name, the file will be selected. Only files that match the given filter are shown. The filter selected is set to selectedFilter. The parameters dir, selectedFilter, and filter may be empty strings. If you want multiple filters, separate them with ';;', for example:

"Images (*.png .xpm .jpg);;Text files (.txt);;XML files (.xml)"

The options argument holds various options about how to run the dialog, see the QFileDialog::Option enum for more information on the flags you can pass.

The dialog's caption is set to caption. If caption is not specified then a default caption will be used.

On Windows, and macOS, this static function will use the native file dialog and not a QFileDialog.

On Windows the dialog will spin a blocking modal event loop that will not dispatch any QTimers, and if parent is not 0 then it will position the dialog just below the parent's title bar.

On Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, the file dialog will change to /var/tmp after entering /usr/tmp. If options includes DontResolveSymlinks, the file dialog will treat symlinks as regular directories.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFileDialog constructors.

See also getOpenFileNames(), getSaveFileName(), and getExistingDirectory().

pub unsafe fn get_open_file_name_3a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QString>>
) -> CppBox<QString>
[src]

This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns a null string.

Calls C++ function: static QString QFileDialog::getOpenFileName(QWidget* parent = …, const QString& caption = …, const QString& dir = …).

C++ documentation:

This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns a null string.


  QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"),
                                                  "/home",
                                                  tr("Images (*.png *.xpm *.jpg)"));

The function creates a modal file dialog with the given parent widget. If parent is not 0, the dialog will be shown centered over the parent widget.

The file dialog's working directory will be set to dir. If dir includes a file name, the file will be selected. Only files that match the given filter are shown. The filter selected is set to selectedFilter. The parameters dir, selectedFilter, and filter may be empty strings. If you want multiple filters, separate them with ';;', for example:

"Images (*.png .xpm .jpg);;Text files (.txt);;XML files (.xml)"

The options argument holds various options about how to run the dialog, see the QFileDialog::Option enum for more information on the flags you can pass.

The dialog's caption is set to caption. If caption is not specified then a default caption will be used.

On Windows, and macOS, this static function will use the native file dialog and not a QFileDialog.

On Windows the dialog will spin a blocking modal event loop that will not dispatch any QTimers, and if parent is not 0 then it will position the dialog just below the parent's title bar.

On Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, the file dialog will change to /var/tmp after entering /usr/tmp. If options includes DontResolveSymlinks, the file dialog will treat symlinks as regular directories.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFileDialog constructors.

See also getOpenFileNames(), getSaveFileName(), and getExistingDirectory().

pub unsafe fn get_open_file_name_2a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>
) -> CppBox<QString>
[src]

This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns a null string.

Calls C++ function: static QString QFileDialog::getOpenFileName(QWidget* parent = …, const QString& caption = …).

C++ documentation:

This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns a null string.


  QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"),
                                                  "/home",
                                                  tr("Images (*.png *.xpm *.jpg)"));

The function creates a modal file dialog with the given parent widget. If parent is not 0, the dialog will be shown centered over the parent widget.

The file dialog's working directory will be set to dir. If dir includes a file name, the file will be selected. Only files that match the given filter are shown. The filter selected is set to selectedFilter. The parameters dir, selectedFilter, and filter may be empty strings. If you want multiple filters, separate them with ';;', for example:

"Images (*.png .xpm .jpg);;Text files (.txt);;XML files (.xml)"

The options argument holds various options about how to run the dialog, see the QFileDialog::Option enum for more information on the flags you can pass.

The dialog's caption is set to caption. If caption is not specified then a default caption will be used.

On Windows, and macOS, this static function will use the native file dialog and not a QFileDialog.

On Windows the dialog will spin a blocking modal event loop that will not dispatch any QTimers, and if parent is not 0 then it will position the dialog just below the parent's title bar.

On Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, the file dialog will change to /var/tmp after entering /usr/tmp. If options includes DontResolveSymlinks, the file dialog will treat symlinks as regular directories.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFileDialog constructors.

See also getOpenFileNames(), getSaveFileName(), and getExistingDirectory().

pub unsafe fn get_open_file_name_1a(
    parent: impl CastInto<Ptr<QWidget>>
) -> CppBox<QString>
[src]

This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns a null string.

Calls C++ function: static QString QFileDialog::getOpenFileName(QWidget* parent = …).

C++ documentation:

This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns a null string.


  QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"),
                                                  "/home",
                                                  tr("Images (*.png *.xpm *.jpg)"));

The function creates a modal file dialog with the given parent widget. If parent is not 0, the dialog will be shown centered over the parent widget.

The file dialog's working directory will be set to dir. If dir includes a file name, the file will be selected. Only files that match the given filter are shown. The filter selected is set to selectedFilter. The parameters dir, selectedFilter, and filter may be empty strings. If you want multiple filters, separate them with ';;', for example:

"Images (*.png .xpm .jpg);;Text files (.txt);;XML files (.xml)"

The options argument holds various options about how to run the dialog, see the QFileDialog::Option enum for more information on the flags you can pass.

The dialog's caption is set to caption. If caption is not specified then a default caption will be used.

On Windows, and macOS, this static function will use the native file dialog and not a QFileDialog.

On Windows the dialog will spin a blocking modal event loop that will not dispatch any QTimers, and if parent is not 0 then it will position the dialog just below the parent's title bar.

On Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, the file dialog will change to /var/tmp after entering /usr/tmp. If options includes DontResolveSymlinks, the file dialog will treat symlinks as regular directories.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFileDialog constructors.

See also getOpenFileNames(), getSaveFileName(), and getExistingDirectory().

pub unsafe fn get_open_file_name_0a() -> CppBox<QString>[src]

This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns a null string.

Calls C++ function: static QString QFileDialog::getOpenFileName().

C++ documentation:

This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns a null string.


  QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"),
                                                  "/home",
                                                  tr("Images (*.png *.xpm *.jpg)"));

The function creates a modal file dialog with the given parent widget. If parent is not 0, the dialog will be shown centered over the parent widget.

The file dialog's working directory will be set to dir. If dir includes a file name, the file will be selected. Only files that match the given filter are shown. The filter selected is set to selectedFilter. The parameters dir, selectedFilter, and filter may be empty strings. If you want multiple filters, separate them with ';;', for example:

"Images (*.png .xpm .jpg);;Text files (.txt);;XML files (.xml)"

The options argument holds various options about how to run the dialog, see the QFileDialog::Option enum for more information on the flags you can pass.

The dialog's caption is set to caption. If caption is not specified then a default caption will be used.

On Windows, and macOS, this static function will use the native file dialog and not a QFileDialog.

On Windows the dialog will spin a blocking modal event loop that will not dispatch any QTimers, and if parent is not 0 then it will position the dialog just below the parent's title bar.

On Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, the file dialog will change to /var/tmp after entering /usr/tmp. If options includes DontResolveSymlinks, the file dialog will treat symlinks as regular directories.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFileDialog constructors.

See also getOpenFileNames(), getSaveFileName(), and getExistingDirectory().

pub unsafe fn get_open_file_names_6a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QString>>,
    filter: impl CastInto<Ref<QString>>,
    selected_filter: impl CastInto<Ptr<QString>>,
    options: QFlags<Option>
) -> CppBox<QStringList>
[src]

This is a convenience static function that will return one or more existing files selected by the user.

Calls C++ function: static QStringList QFileDialog::getOpenFileNames(QWidget* parent = …, const QString& caption = …, const QString& dir = …, const QString& filter = …, QString* selectedFilter = …, QFlags<QFileDialog::Option> options = …).

C++ documentation:

This is a convenience static function that will return one or more existing files selected by the user.


  QStringList files = QFileDialog::getOpenFileNames(
                          this,
                          "Select one or more files to open",
                          "/home",
                          "Images (*.png *.xpm *.jpg)");

This function creates a modal file dialog with the given parent widget. If parent is not 0, the dialog will be shown centered over the parent widget.

The file dialog's working directory will be set to dir. If dir includes a file name, the file will be selected. The filter is set to filter so that only those files which match the filter are shown. The filter selected is set to selectedFilter. The parameters dir, selectedFilter and filter may be empty strings. If you need multiple filters, separate them with ';;', for instance:

"Images (*.png .xpm .jpg);;Text files (.txt);;XML files (.xml)"

The dialog's caption is set to caption. If caption is not specified then a default caption will be used.

On Windows, and macOS, this static function will use the native file dialog and not a QFileDialog.

On Windows the dialog will spin a blocking modal event loop that will not dispatch any QTimers, and if parent is not 0 then it will position the dialog just below the parent's title bar.

On Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, the file dialog will change to /var/tmp after entering /usr/tmp. The options argument holds various options about how to run the dialog, see the QFileDialog::Option enum for more information on the flags you can pass.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFileDialog constructors.

See also getOpenFileName(), getSaveFileName(), and getExistingDirectory().

pub unsafe fn get_open_file_names_5a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QString>>,
    filter: impl CastInto<Ref<QString>>,
    selected_filter: impl CastInto<Ptr<QString>>
) -> CppBox<QStringList>
[src]

This is a convenience static function that will return one or more existing files selected by the user.

Calls C++ function: static QStringList QFileDialog::getOpenFileNames(QWidget* parent = …, const QString& caption = …, const QString& dir = …, const QString& filter = …, QString* selectedFilter = …).

C++ documentation:

This is a convenience static function that will return one or more existing files selected by the user.


  QStringList files = QFileDialog::getOpenFileNames(
                          this,
                          "Select one or more files to open",
                          "/home",
                          "Images (*.png *.xpm *.jpg)");

This function creates a modal file dialog with the given parent widget. If parent is not 0, the dialog will be shown centered over the parent widget.

The file dialog's working directory will be set to dir. If dir includes a file name, the file will be selected. The filter is set to filter so that only those files which match the filter are shown. The filter selected is set to selectedFilter. The parameters dir, selectedFilter and filter may be empty strings. If you need multiple filters, separate them with ';;', for instance:

"Images (*.png .xpm .jpg);;Text files (.txt);;XML files (.xml)"

The dialog's caption is set to caption. If caption is not specified then a default caption will be used.

On Windows, and macOS, this static function will use the native file dialog and not a QFileDialog.

On Windows the dialog will spin a blocking modal event loop that will not dispatch any QTimers, and if parent is not 0 then it will position the dialog just below the parent's title bar.

On Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, the file dialog will change to /var/tmp after entering /usr/tmp. The options argument holds various options about how to run the dialog, see the QFileDialog::Option enum for more information on the flags you can pass.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFileDialog constructors.

See also getOpenFileName(), getSaveFileName(), and getExistingDirectory().

pub unsafe fn get_open_file_names_4a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QString>>,
    filter: impl CastInto<Ref<QString>>
) -> CppBox<QStringList>
[src]

This is a convenience static function that will return one or more existing files selected by the user.

Calls C++ function: static QStringList QFileDialog::getOpenFileNames(QWidget* parent = …, const QString& caption = …, const QString& dir = …, const QString& filter = …).

C++ documentation:

This is a convenience static function that will return one or more existing files selected by the user.


  QStringList files = QFileDialog::getOpenFileNames(
                          this,
                          "Select one or more files to open",
                          "/home",
                          "Images (*.png *.xpm *.jpg)");

This function creates a modal file dialog with the given parent widget. If parent is not 0, the dialog will be shown centered over the parent widget.

The file dialog's working directory will be set to dir. If dir includes a file name, the file will be selected. The filter is set to filter so that only those files which match the filter are shown. The filter selected is set to selectedFilter. The parameters dir, selectedFilter and filter may be empty strings. If you need multiple filters, separate them with ';;', for instance:

"Images (*.png .xpm .jpg);;Text files (.txt);;XML files (.xml)"

The dialog's caption is set to caption. If caption is not specified then a default caption will be used.

On Windows, and macOS, this static function will use the native file dialog and not a QFileDialog.

On Windows the dialog will spin a blocking modal event loop that will not dispatch any QTimers, and if parent is not 0 then it will position the dialog just below the parent's title bar.

On Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, the file dialog will change to /var/tmp after entering /usr/tmp. The options argument holds various options about how to run the dialog, see the QFileDialog::Option enum for more information on the flags you can pass.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFileDialog constructors.

See also getOpenFileName(), getSaveFileName(), and getExistingDirectory().

pub unsafe fn get_open_file_names_3a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QString>>
) -> CppBox<QStringList>
[src]

This is a convenience static function that will return one or more existing files selected by the user.

Calls C++ function: static QStringList QFileDialog::getOpenFileNames(QWidget* parent = …, const QString& caption = …, const QString& dir = …).

C++ documentation:

This is a convenience static function that will return one or more existing files selected by the user.


  QStringList files = QFileDialog::getOpenFileNames(
                          this,
                          "Select one or more files to open",
                          "/home",
                          "Images (*.png *.xpm *.jpg)");

This function creates a modal file dialog with the given parent widget. If parent is not 0, the dialog will be shown centered over the parent widget.

The file dialog's working directory will be set to dir. If dir includes a file name, the file will be selected. The filter is set to filter so that only those files which match the filter are shown. The filter selected is set to selectedFilter. The parameters dir, selectedFilter and filter may be empty strings. If you need multiple filters, separate them with ';;', for instance:

"Images (*.png .xpm .jpg);;Text files (.txt);;XML files (.xml)"

The dialog's caption is set to caption. If caption is not specified then a default caption will be used.

On Windows, and macOS, this static function will use the native file dialog and not a QFileDialog.

On Windows the dialog will spin a blocking modal event loop that will not dispatch any QTimers, and if parent is not 0 then it will position the dialog just below the parent's title bar.

On Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, the file dialog will change to /var/tmp after entering /usr/tmp. The options argument holds various options about how to run the dialog, see the QFileDialog::Option enum for more information on the flags you can pass.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFileDialog constructors.

See also getOpenFileName(), getSaveFileName(), and getExistingDirectory().

pub unsafe fn get_open_file_names_2a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>
) -> CppBox<QStringList>
[src]

This is a convenience static function that will return one or more existing files selected by the user.

Calls C++ function: static QStringList QFileDialog::getOpenFileNames(QWidget* parent = …, const QString& caption = …).

C++ documentation:

This is a convenience static function that will return one or more existing files selected by the user.


  QStringList files = QFileDialog::getOpenFileNames(
                          this,
                          "Select one or more files to open",
                          "/home",
                          "Images (*.png *.xpm *.jpg)");

This function creates a modal file dialog with the given parent widget. If parent is not 0, the dialog will be shown centered over the parent widget.

The file dialog's working directory will be set to dir. If dir includes a file name, the file will be selected. The filter is set to filter so that only those files which match the filter are shown. The filter selected is set to selectedFilter. The parameters dir, selectedFilter and filter may be empty strings. If you need multiple filters, separate them with ';;', for instance:

"Images (*.png .xpm .jpg);;Text files (.txt);;XML files (.xml)"

The dialog's caption is set to caption. If caption is not specified then a default caption will be used.

On Windows, and macOS, this static function will use the native file dialog and not a QFileDialog.

On Windows the dialog will spin a blocking modal event loop that will not dispatch any QTimers, and if parent is not 0 then it will position the dialog just below the parent's title bar.

On Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, the file dialog will change to /var/tmp after entering /usr/tmp. The options argument holds various options about how to run the dialog, see the QFileDialog::Option enum for more information on the flags you can pass.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFileDialog constructors.

See also getOpenFileName(), getSaveFileName(), and getExistingDirectory().

pub unsafe fn get_open_file_names_1a(
    parent: impl CastInto<Ptr<QWidget>>
) -> CppBox<QStringList>
[src]

This is a convenience static function that will return one or more existing files selected by the user.

Calls C++ function: static QStringList QFileDialog::getOpenFileNames(QWidget* parent = …).

C++ documentation:

This is a convenience static function that will return one or more existing files selected by the user.


  QStringList files = QFileDialog::getOpenFileNames(
                          this,
                          "Select one or more files to open",
                          "/home",
                          "Images (*.png *.xpm *.jpg)");

This function creates a modal file dialog with the given parent widget. If parent is not 0, the dialog will be shown centered over the parent widget.

The file dialog's working directory will be set to dir. If dir includes a file name, the file will be selected. The filter is set to filter so that only those files which match the filter are shown. The filter selected is set to selectedFilter. The parameters dir, selectedFilter and filter may be empty strings. If you need multiple filters, separate them with ';;', for instance:

"Images (*.png .xpm .jpg);;Text files (.txt);;XML files (.xml)"

The dialog's caption is set to caption. If caption is not specified then a default caption will be used.

On Windows, and macOS, this static function will use the native file dialog and not a QFileDialog.

On Windows the dialog will spin a blocking modal event loop that will not dispatch any QTimers, and if parent is not 0 then it will position the dialog just below the parent's title bar.

On Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, the file dialog will change to /var/tmp after entering /usr/tmp. The options argument holds various options about how to run the dialog, see the QFileDialog::Option enum for more information on the flags you can pass.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFileDialog constructors.

See also getOpenFileName(), getSaveFileName(), and getExistingDirectory().

pub unsafe fn get_open_file_names_0a() -> CppBox<QStringList>[src]

This is a convenience static function that will return one or more existing files selected by the user.

Calls C++ function: static QStringList QFileDialog::getOpenFileNames().

C++ documentation:

This is a convenience static function that will return one or more existing files selected by the user.


  QStringList files = QFileDialog::getOpenFileNames(
                          this,
                          "Select one or more files to open",
                          "/home",
                          "Images (*.png *.xpm *.jpg)");

This function creates a modal file dialog with the given parent widget. If parent is not 0, the dialog will be shown centered over the parent widget.

The file dialog's working directory will be set to dir. If dir includes a file name, the file will be selected. The filter is set to filter so that only those files which match the filter are shown. The filter selected is set to selectedFilter. The parameters dir, selectedFilter and filter may be empty strings. If you need multiple filters, separate them with ';;', for instance:

"Images (*.png .xpm .jpg);;Text files (.txt);;XML files (.xml)"

The dialog's caption is set to caption. If caption is not specified then a default caption will be used.

On Windows, and macOS, this static function will use the native file dialog and not a QFileDialog.

On Windows the dialog will spin a blocking modal event loop that will not dispatch any QTimers, and if parent is not 0 then it will position the dialog just below the parent's title bar.

On Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, the file dialog will change to /var/tmp after entering /usr/tmp. The options argument holds various options about how to run the dialog, see the QFileDialog::Option enum for more information on the flags you can pass.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFileDialog constructors.

See also getOpenFileName(), getSaveFileName(), and getExistingDirectory().

pub unsafe fn get_open_file_url_7a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QUrl>>,
    filter: impl CastInto<Ref<QString>>,
    selected_filter: impl CastInto<Ptr<QString>>,
    options: QFlags<Option>,
    supported_schemes: impl CastInto<Ref<QStringList>>
) -> CppBox<QUrl>
[src]

This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns an empty url.

Calls C++ function: static QUrl QFileDialog::getOpenFileUrl(QWidget* parent = …, const QString& caption = …, const QUrl& dir = …, const QString& filter = …, QString* selectedFilter = …, QFlags<QFileDialog::Option> options = …, const QStringList& supportedSchemes = …).

C++ documentation:

This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns an empty url.

The function is used similarly to QFileDialog::getOpenFileName(). In particular parent, caption, dir, filter, selectedFilter and options are used in the exact same way.

The main difference with QFileDialog::getOpenFileName() comes from the ability offered to the user to select a remote file. That's why the return type and the type of dir is QUrl.

The supportedSchemes argument allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to fetch the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

When possible, this static function will use the native file dialog and not a QFileDialog. On platforms which don't support selecting remote files, Qt will allow to select only local files.

This function was introduced in Qt 5.2.

See also getOpenFileName(), getOpenFileUrls(), getSaveFileUrl(), and getExistingDirectoryUrl().

pub unsafe fn get_open_file_url_6a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QUrl>>,
    filter: impl CastInto<Ref<QString>>,
    selected_filter: impl CastInto<Ptr<QString>>,
    options: QFlags<Option>
) -> CppBox<QUrl>
[src]

This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns an empty url.

Calls C++ function: static QUrl QFileDialog::getOpenFileUrl(QWidget* parent = …, const QString& caption = …, const QUrl& dir = …, const QString& filter = …, QString* selectedFilter = …, QFlags<QFileDialog::Option> options = …).

C++ documentation:

This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns an empty url.

The function is used similarly to QFileDialog::getOpenFileName(). In particular parent, caption, dir, filter, selectedFilter and options are used in the exact same way.

The main difference with QFileDialog::getOpenFileName() comes from the ability offered to the user to select a remote file. That's why the return type and the type of dir is QUrl.

The supportedSchemes argument allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to fetch the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

When possible, this static function will use the native file dialog and not a QFileDialog. On platforms which don't support selecting remote files, Qt will allow to select only local files.

This function was introduced in Qt 5.2.

See also getOpenFileName(), getOpenFileUrls(), getSaveFileUrl(), and getExistingDirectoryUrl().

pub unsafe fn get_open_file_url_5a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QUrl>>,
    filter: impl CastInto<Ref<QString>>,
    selected_filter: impl CastInto<Ptr<QString>>
) -> CppBox<QUrl>
[src]

This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns an empty url.

Calls C++ function: static QUrl QFileDialog::getOpenFileUrl(QWidget* parent = …, const QString& caption = …, const QUrl& dir = …, const QString& filter = …, QString* selectedFilter = …).

C++ documentation:

This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns an empty url.

The function is used similarly to QFileDialog::getOpenFileName(). In particular parent, caption, dir, filter, selectedFilter and options are used in the exact same way.

The main difference with QFileDialog::getOpenFileName() comes from the ability offered to the user to select a remote file. That's why the return type and the type of dir is QUrl.

The supportedSchemes argument allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to fetch the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

When possible, this static function will use the native file dialog and not a QFileDialog. On platforms which don't support selecting remote files, Qt will allow to select only local files.

This function was introduced in Qt 5.2.

See also getOpenFileName(), getOpenFileUrls(), getSaveFileUrl(), and getExistingDirectoryUrl().

pub unsafe fn get_open_file_url_4a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QUrl>>,
    filter: impl CastInto<Ref<QString>>
) -> CppBox<QUrl>
[src]

This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns an empty url.

Calls C++ function: static QUrl QFileDialog::getOpenFileUrl(QWidget* parent = …, const QString& caption = …, const QUrl& dir = …, const QString& filter = …).

C++ documentation:

This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns an empty url.

The function is used similarly to QFileDialog::getOpenFileName(). In particular parent, caption, dir, filter, selectedFilter and options are used in the exact same way.

The main difference with QFileDialog::getOpenFileName() comes from the ability offered to the user to select a remote file. That's why the return type and the type of dir is QUrl.

The supportedSchemes argument allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to fetch the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

When possible, this static function will use the native file dialog and not a QFileDialog. On platforms which don't support selecting remote files, Qt will allow to select only local files.

This function was introduced in Qt 5.2.

See also getOpenFileName(), getOpenFileUrls(), getSaveFileUrl(), and getExistingDirectoryUrl().

pub unsafe fn get_open_file_url_3a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QUrl>>
) -> CppBox<QUrl>
[src]

This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns an empty url.

Calls C++ function: static QUrl QFileDialog::getOpenFileUrl(QWidget* parent = …, const QString& caption = …, const QUrl& dir = …).

C++ documentation:

This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns an empty url.

The function is used similarly to QFileDialog::getOpenFileName(). In particular parent, caption, dir, filter, selectedFilter and options are used in the exact same way.

The main difference with QFileDialog::getOpenFileName() comes from the ability offered to the user to select a remote file. That's why the return type and the type of dir is QUrl.

The supportedSchemes argument allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to fetch the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

When possible, this static function will use the native file dialog and not a QFileDialog. On platforms which don't support selecting remote files, Qt will allow to select only local files.

This function was introduced in Qt 5.2.

See also getOpenFileName(), getOpenFileUrls(), getSaveFileUrl(), and getExistingDirectoryUrl().

pub unsafe fn get_open_file_url_2a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>
) -> CppBox<QUrl>
[src]

This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns an empty url.

Calls C++ function: static QUrl QFileDialog::getOpenFileUrl(QWidget* parent = …, const QString& caption = …).

C++ documentation:

This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns an empty url.

The function is used similarly to QFileDialog::getOpenFileName(). In particular parent, caption, dir, filter, selectedFilter and options are used in the exact same way.

The main difference with QFileDialog::getOpenFileName() comes from the ability offered to the user to select a remote file. That's why the return type and the type of dir is QUrl.

The supportedSchemes argument allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to fetch the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

When possible, this static function will use the native file dialog and not a QFileDialog. On platforms which don't support selecting remote files, Qt will allow to select only local files.

This function was introduced in Qt 5.2.

See also getOpenFileName(), getOpenFileUrls(), getSaveFileUrl(), and getExistingDirectoryUrl().

pub unsafe fn get_open_file_url_1a(
    parent: impl CastInto<Ptr<QWidget>>
) -> CppBox<QUrl>
[src]

This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns an empty url.

Calls C++ function: static QUrl QFileDialog::getOpenFileUrl(QWidget* parent = …).

C++ documentation:

This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns an empty url.

The function is used similarly to QFileDialog::getOpenFileName(). In particular parent, caption, dir, filter, selectedFilter and options are used in the exact same way.

The main difference with QFileDialog::getOpenFileName() comes from the ability offered to the user to select a remote file. That's why the return type and the type of dir is QUrl.

The supportedSchemes argument allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to fetch the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

When possible, this static function will use the native file dialog and not a QFileDialog. On platforms which don't support selecting remote files, Qt will allow to select only local files.

This function was introduced in Qt 5.2.

See also getOpenFileName(), getOpenFileUrls(), getSaveFileUrl(), and getExistingDirectoryUrl().

pub unsafe fn get_open_file_url_0a() -> CppBox<QUrl>[src]

This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns an empty url.

Calls C++ function: static QUrl QFileDialog::getOpenFileUrl().

C++ documentation:

This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns an empty url.

The function is used similarly to QFileDialog::getOpenFileName(). In particular parent, caption, dir, filter, selectedFilter and options are used in the exact same way.

The main difference with QFileDialog::getOpenFileName() comes from the ability offered to the user to select a remote file. That's why the return type and the type of dir is QUrl.

The supportedSchemes argument allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to fetch the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

When possible, this static function will use the native file dialog and not a QFileDialog. On platforms which don't support selecting remote files, Qt will allow to select only local files.

This function was introduced in Qt 5.2.

See also getOpenFileName(), getOpenFileUrls(), getSaveFileUrl(), and getExistingDirectoryUrl().

pub unsafe fn get_open_file_urls_7a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QUrl>>,
    filter: impl CastInto<Ref<QString>>,
    selected_filter: impl CastInto<Ptr<QString>>,
    options: QFlags<Option>,
    supported_schemes: impl CastInto<Ref<QStringList>>
) -> CppBox<QListOfQUrl>
[src]

This is a convenience static function that will return one or more existing files selected by the user. If the user presses Cancel, it returns an empty list.

Calls C++ function: static QList<QUrl> QFileDialog::getOpenFileUrls(QWidget* parent = …, const QString& caption = …, const QUrl& dir = …, const QString& filter = …, QString* selectedFilter = …, QFlags<QFileDialog::Option> options = …, const QStringList& supportedSchemes = …).

C++ documentation:

This is a convenience static function that will return one or more existing files selected by the user. If the user presses Cancel, it returns an empty list.

The function is used similarly to QFileDialog::getOpenFileNames(). In particular parent, caption, dir, filter, selectedFilter and options are used in the exact same way.

The main difference with QFileDialog::getOpenFileNames() comes from the ability offered to the user to select remote files. That's why the return type and the type of dir are respectively QList<QUrl> and QUrl.

The supportedSchemes argument allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to fetch the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

When possible, this static function will use the native file dialog and not a QFileDialog. On platforms which don't support selecting remote files, Qt will allow to select only local files.

This function was introduced in Qt 5.2.

See also getOpenFileNames(), getOpenFileUrl(), getSaveFileUrl(), and getExistingDirectoryUrl().

pub unsafe fn get_open_file_urls_6a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QUrl>>,
    filter: impl CastInto<Ref<QString>>,
    selected_filter: impl CastInto<Ptr<QString>>,
    options: QFlags<Option>
) -> CppBox<QListOfQUrl>
[src]

This is a convenience static function that will return one or more existing files selected by the user. If the user presses Cancel, it returns an empty list.

Calls C++ function: static QList<QUrl> QFileDialog::getOpenFileUrls(QWidget* parent = …, const QString& caption = …, const QUrl& dir = …, const QString& filter = …, QString* selectedFilter = …, QFlags<QFileDialog::Option> options = …).

C++ documentation:

This is a convenience static function that will return one or more existing files selected by the user. If the user presses Cancel, it returns an empty list.

The function is used similarly to QFileDialog::getOpenFileNames(). In particular parent, caption, dir, filter, selectedFilter and options are used in the exact same way.

The main difference with QFileDialog::getOpenFileNames() comes from the ability offered to the user to select remote files. That's why the return type and the type of dir are respectively QList<QUrl> and QUrl.

The supportedSchemes argument allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to fetch the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

When possible, this static function will use the native file dialog and not a QFileDialog. On platforms which don't support selecting remote files, Qt will allow to select only local files.

This function was introduced in Qt 5.2.

See also getOpenFileNames(), getOpenFileUrl(), getSaveFileUrl(), and getExistingDirectoryUrl().

pub unsafe fn get_open_file_urls_5a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QUrl>>,
    filter: impl CastInto<Ref<QString>>,
    selected_filter: impl CastInto<Ptr<QString>>
) -> CppBox<QListOfQUrl>
[src]

This is a convenience static function that will return one or more existing files selected by the user. If the user presses Cancel, it returns an empty list.

Calls C++ function: static QList<QUrl> QFileDialog::getOpenFileUrls(QWidget* parent = …, const QString& caption = …, const QUrl& dir = …, const QString& filter = …, QString* selectedFilter = …).

C++ documentation:

This is a convenience static function that will return one or more existing files selected by the user. If the user presses Cancel, it returns an empty list.

The function is used similarly to QFileDialog::getOpenFileNames(). In particular parent, caption, dir, filter, selectedFilter and options are used in the exact same way.

The main difference with QFileDialog::getOpenFileNames() comes from the ability offered to the user to select remote files. That's why the return type and the type of dir are respectively QList<QUrl> and QUrl.

The supportedSchemes argument allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to fetch the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

When possible, this static function will use the native file dialog and not a QFileDialog. On platforms which don't support selecting remote files, Qt will allow to select only local files.

This function was introduced in Qt 5.2.

See also getOpenFileNames(), getOpenFileUrl(), getSaveFileUrl(), and getExistingDirectoryUrl().

pub unsafe fn get_open_file_urls_4a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QUrl>>,
    filter: impl CastInto<Ref<QString>>
) -> CppBox<QListOfQUrl>
[src]

This is a convenience static function that will return one or more existing files selected by the user. If the user presses Cancel, it returns an empty list.

Calls C++ function: static QList<QUrl> QFileDialog::getOpenFileUrls(QWidget* parent = …, const QString& caption = …, const QUrl& dir = …, const QString& filter = …).

C++ documentation:

This is a convenience static function that will return one or more existing files selected by the user. If the user presses Cancel, it returns an empty list.

The function is used similarly to QFileDialog::getOpenFileNames(). In particular parent, caption, dir, filter, selectedFilter and options are used in the exact same way.

The main difference with QFileDialog::getOpenFileNames() comes from the ability offered to the user to select remote files. That's why the return type and the type of dir are respectively QList<QUrl> and QUrl.

The supportedSchemes argument allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to fetch the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

When possible, this static function will use the native file dialog and not a QFileDialog. On platforms which don't support selecting remote files, Qt will allow to select only local files.

This function was introduced in Qt 5.2.

See also getOpenFileNames(), getOpenFileUrl(), getSaveFileUrl(), and getExistingDirectoryUrl().

pub unsafe fn get_open_file_urls_3a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QUrl>>
) -> CppBox<QListOfQUrl>
[src]

This is a convenience static function that will return one or more existing files selected by the user. If the user presses Cancel, it returns an empty list.

Calls C++ function: static QList<QUrl> QFileDialog::getOpenFileUrls(QWidget* parent = …, const QString& caption = …, const QUrl& dir = …).

C++ documentation:

This is a convenience static function that will return one or more existing files selected by the user. If the user presses Cancel, it returns an empty list.

The function is used similarly to QFileDialog::getOpenFileNames(). In particular parent, caption, dir, filter, selectedFilter and options are used in the exact same way.

The main difference with QFileDialog::getOpenFileNames() comes from the ability offered to the user to select remote files. That's why the return type and the type of dir are respectively QList<QUrl> and QUrl.

The supportedSchemes argument allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to fetch the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

When possible, this static function will use the native file dialog and not a QFileDialog. On platforms which don't support selecting remote files, Qt will allow to select only local files.

This function was introduced in Qt 5.2.

See also getOpenFileNames(), getOpenFileUrl(), getSaveFileUrl(), and getExistingDirectoryUrl().

pub unsafe fn get_open_file_urls_2a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>
) -> CppBox<QListOfQUrl>
[src]

This is a convenience static function that will return one or more existing files selected by the user. If the user presses Cancel, it returns an empty list.

Calls C++ function: static QList<QUrl> QFileDialog::getOpenFileUrls(QWidget* parent = …, const QString& caption = …).

C++ documentation:

This is a convenience static function that will return one or more existing files selected by the user. If the user presses Cancel, it returns an empty list.

The function is used similarly to QFileDialog::getOpenFileNames(). In particular parent, caption, dir, filter, selectedFilter and options are used in the exact same way.

The main difference with QFileDialog::getOpenFileNames() comes from the ability offered to the user to select remote files. That's why the return type and the type of dir are respectively QList<QUrl> and QUrl.

The supportedSchemes argument allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to fetch the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

When possible, this static function will use the native file dialog and not a QFileDialog. On platforms which don't support selecting remote files, Qt will allow to select only local files.

This function was introduced in Qt 5.2.

See also getOpenFileNames(), getOpenFileUrl(), getSaveFileUrl(), and getExistingDirectoryUrl().

pub unsafe fn get_open_file_urls_1a(
    parent: impl CastInto<Ptr<QWidget>>
) -> CppBox<QListOfQUrl>
[src]

This is a convenience static function that will return one or more existing files selected by the user. If the user presses Cancel, it returns an empty list.

Calls C++ function: static QList<QUrl> QFileDialog::getOpenFileUrls(QWidget* parent = …).

C++ documentation:

This is a convenience static function that will return one or more existing files selected by the user. If the user presses Cancel, it returns an empty list.

The function is used similarly to QFileDialog::getOpenFileNames(). In particular parent, caption, dir, filter, selectedFilter and options are used in the exact same way.

The main difference with QFileDialog::getOpenFileNames() comes from the ability offered to the user to select remote files. That's why the return type and the type of dir are respectively QList<QUrl> and QUrl.

The supportedSchemes argument allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to fetch the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

When possible, this static function will use the native file dialog and not a QFileDialog. On platforms which don't support selecting remote files, Qt will allow to select only local files.

This function was introduced in Qt 5.2.

See also getOpenFileNames(), getOpenFileUrl(), getSaveFileUrl(), and getExistingDirectoryUrl().

pub unsafe fn get_open_file_urls_0a() -> CppBox<QListOfQUrl>[src]

This is a convenience static function that will return one or more existing files selected by the user. If the user presses Cancel, it returns an empty list.

Calls C++ function: static QList<QUrl> QFileDialog::getOpenFileUrls().

C++ documentation:

This is a convenience static function that will return one or more existing files selected by the user. If the user presses Cancel, it returns an empty list.

The function is used similarly to QFileDialog::getOpenFileNames(). In particular parent, caption, dir, filter, selectedFilter and options are used in the exact same way.

The main difference with QFileDialog::getOpenFileNames() comes from the ability offered to the user to select remote files. That's why the return type and the type of dir are respectively QList<QUrl> and QUrl.

The supportedSchemes argument allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to fetch the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

When possible, this static function will use the native file dialog and not a QFileDialog. On platforms which don't support selecting remote files, Qt will allow to select only local files.

This function was introduced in Qt 5.2.

See also getOpenFileNames(), getOpenFileUrl(), getSaveFileUrl(), and getExistingDirectoryUrl().

pub unsafe fn get_save_file_name_6a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QString>>,
    filter: impl CastInto<Ref<QString>>,
    selected_filter: impl CastInto<Ptr<QString>>,
    options: QFlags<Option>
) -> CppBox<QString>
[src]

This is a convenience static function that will return a file name selected by the user. The file does not have to exist.

Calls C++ function: static QString QFileDialog::getSaveFileName(QWidget* parent = …, const QString& caption = …, const QString& dir = …, const QString& filter = …, QString* selectedFilter = …, QFlags<QFileDialog::Option> options = …).

C++ documentation:

This is a convenience static function that will return a file name selected by the user. The file does not have to exist.

It creates a modal file dialog with the given parent widget. If parent is not 0, the dialog will be shown centered over the parent widget.

QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"), "/home/jana/untitled.png", tr("Images (*.png *.xpm *.jpg)"));

The file dialog's working directory will be set to dir. If dir includes a file name, the file will be selected. Only files that match the filter are shown. The filter selected is set to selectedFilter. The parameters dir, selectedFilter, and filter may be empty strings. Multiple filters are separated with ';;'. For instance:

"Images (*.png .xpm .jpg);;Text files (.txt);;XML files (.xml)"

The options argument holds various options about how to run the dialog, see the QFileDialog::Option enum for more information on the flags you can pass.

The default filter can be chosen by setting selectedFilter to the desired value.

The dialog's caption is set to caption. If caption is not specified, a default caption will be used.

On Windows, and macOS, this static function will use the native file dialog and not a QFileDialog.

On Windows the dialog will spin a blocking modal event loop that will not dispatch any QTimers, and if parent is not 0 then it will position the dialog just below the parent's title bar. On macOS, with its native file dialog, the filter argument is ignored.

On Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, the file dialog will change to /var/tmp after entering /usr/tmp. If options includes DontResolveSymlinks the file dialog will treat symlinks as regular directories.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFileDialog constructors.

See also getOpenFileName(), getOpenFileNames(), and getExistingDirectory().

pub unsafe fn get_save_file_name_5a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QString>>,
    filter: impl CastInto<Ref<QString>>,
    selected_filter: impl CastInto<Ptr<QString>>
) -> CppBox<QString>
[src]

This is a convenience static function that will return a file name selected by the user. The file does not have to exist.

Calls C++ function: static QString QFileDialog::getSaveFileName(QWidget* parent = …, const QString& caption = …, const QString& dir = …, const QString& filter = …, QString* selectedFilter = …).

C++ documentation:

This is a convenience static function that will return a file name selected by the user. The file does not have to exist.

It creates a modal file dialog with the given parent widget. If parent is not 0, the dialog will be shown centered over the parent widget.

QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"), "/home/jana/untitled.png", tr("Images (*.png *.xpm *.jpg)"));

The file dialog's working directory will be set to dir. If dir includes a file name, the file will be selected. Only files that match the filter are shown. The filter selected is set to selectedFilter. The parameters dir, selectedFilter, and filter may be empty strings. Multiple filters are separated with ';;'. For instance:

"Images (*.png .xpm .jpg);;Text files (.txt);;XML files (.xml)"

The options argument holds various options about how to run the dialog, see the QFileDialog::Option enum for more information on the flags you can pass.

The default filter can be chosen by setting selectedFilter to the desired value.

The dialog's caption is set to caption. If caption is not specified, a default caption will be used.

On Windows, and macOS, this static function will use the native file dialog and not a QFileDialog.

On Windows the dialog will spin a blocking modal event loop that will not dispatch any QTimers, and if parent is not 0 then it will position the dialog just below the parent's title bar. On macOS, with its native file dialog, the filter argument is ignored.

On Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, the file dialog will change to /var/tmp after entering /usr/tmp. If options includes DontResolveSymlinks the file dialog will treat symlinks as regular directories.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFileDialog constructors.

See also getOpenFileName(), getOpenFileNames(), and getExistingDirectory().

pub unsafe fn get_save_file_name_4a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QString>>,
    filter: impl CastInto<Ref<QString>>
) -> CppBox<QString>
[src]

This is a convenience static function that will return a file name selected by the user. The file does not have to exist.

Calls C++ function: static QString QFileDialog::getSaveFileName(QWidget* parent = …, const QString& caption = …, const QString& dir = …, const QString& filter = …).

C++ documentation:

This is a convenience static function that will return a file name selected by the user. The file does not have to exist.

It creates a modal file dialog with the given parent widget. If parent is not 0, the dialog will be shown centered over the parent widget.

QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"), "/home/jana/untitled.png", tr("Images (*.png *.xpm *.jpg)"));

The file dialog's working directory will be set to dir. If dir includes a file name, the file will be selected. Only files that match the filter are shown. The filter selected is set to selectedFilter. The parameters dir, selectedFilter, and filter may be empty strings. Multiple filters are separated with ';;'. For instance:

"Images (*.png .xpm .jpg);;Text files (.txt);;XML files (.xml)"

The options argument holds various options about how to run the dialog, see the QFileDialog::Option enum for more information on the flags you can pass.

The default filter can be chosen by setting selectedFilter to the desired value.

The dialog's caption is set to caption. If caption is not specified, a default caption will be used.

On Windows, and macOS, this static function will use the native file dialog and not a QFileDialog.

On Windows the dialog will spin a blocking modal event loop that will not dispatch any QTimers, and if parent is not 0 then it will position the dialog just below the parent's title bar. On macOS, with its native file dialog, the filter argument is ignored.

On Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, the file dialog will change to /var/tmp after entering /usr/tmp. If options includes DontResolveSymlinks the file dialog will treat symlinks as regular directories.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFileDialog constructors.

See also getOpenFileName(), getOpenFileNames(), and getExistingDirectory().

pub unsafe fn get_save_file_name_3a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QString>>
) -> CppBox<QString>
[src]

This is a convenience static function that will return a file name selected by the user. The file does not have to exist.

Calls C++ function: static QString QFileDialog::getSaveFileName(QWidget* parent = …, const QString& caption = …, const QString& dir = …).

C++ documentation:

This is a convenience static function that will return a file name selected by the user. The file does not have to exist.

It creates a modal file dialog with the given parent widget. If parent is not 0, the dialog will be shown centered over the parent widget.

QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"), "/home/jana/untitled.png", tr("Images (*.png *.xpm *.jpg)"));

The file dialog's working directory will be set to dir. If dir includes a file name, the file will be selected. Only files that match the filter are shown. The filter selected is set to selectedFilter. The parameters dir, selectedFilter, and filter may be empty strings. Multiple filters are separated with ';;'. For instance:

"Images (*.png .xpm .jpg);;Text files (.txt);;XML files (.xml)"

The options argument holds various options about how to run the dialog, see the QFileDialog::Option enum for more information on the flags you can pass.

The default filter can be chosen by setting selectedFilter to the desired value.

The dialog's caption is set to caption. If caption is not specified, a default caption will be used.

On Windows, and macOS, this static function will use the native file dialog and not a QFileDialog.

On Windows the dialog will spin a blocking modal event loop that will not dispatch any QTimers, and if parent is not 0 then it will position the dialog just below the parent's title bar. On macOS, with its native file dialog, the filter argument is ignored.

On Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, the file dialog will change to /var/tmp after entering /usr/tmp. If options includes DontResolveSymlinks the file dialog will treat symlinks as regular directories.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFileDialog constructors.

See also getOpenFileName(), getOpenFileNames(), and getExistingDirectory().

pub unsafe fn get_save_file_name_2a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>
) -> CppBox<QString>
[src]

This is a convenience static function that will return a file name selected by the user. The file does not have to exist.

Calls C++ function: static QString QFileDialog::getSaveFileName(QWidget* parent = …, const QString& caption = …).

C++ documentation:

This is a convenience static function that will return a file name selected by the user. The file does not have to exist.

It creates a modal file dialog with the given parent widget. If parent is not 0, the dialog will be shown centered over the parent widget.

QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"), "/home/jana/untitled.png", tr("Images (*.png *.xpm *.jpg)"));

The file dialog's working directory will be set to dir. If dir includes a file name, the file will be selected. Only files that match the filter are shown. The filter selected is set to selectedFilter. The parameters dir, selectedFilter, and filter may be empty strings. Multiple filters are separated with ';;'. For instance:

"Images (*.png .xpm .jpg);;Text files (.txt);;XML files (.xml)"

The options argument holds various options about how to run the dialog, see the QFileDialog::Option enum for more information on the flags you can pass.

The default filter can be chosen by setting selectedFilter to the desired value.

The dialog's caption is set to caption. If caption is not specified, a default caption will be used.

On Windows, and macOS, this static function will use the native file dialog and not a QFileDialog.

On Windows the dialog will spin a blocking modal event loop that will not dispatch any QTimers, and if parent is not 0 then it will position the dialog just below the parent's title bar. On macOS, with its native file dialog, the filter argument is ignored.

On Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, the file dialog will change to /var/tmp after entering /usr/tmp. If options includes DontResolveSymlinks the file dialog will treat symlinks as regular directories.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFileDialog constructors.

See also getOpenFileName(), getOpenFileNames(), and getExistingDirectory().

pub unsafe fn get_save_file_name_1a(
    parent: impl CastInto<Ptr<QWidget>>
) -> CppBox<QString>
[src]

This is a convenience static function that will return a file name selected by the user. The file does not have to exist.

Calls C++ function: static QString QFileDialog::getSaveFileName(QWidget* parent = …).

C++ documentation:

This is a convenience static function that will return a file name selected by the user. The file does not have to exist.

It creates a modal file dialog with the given parent widget. If parent is not 0, the dialog will be shown centered over the parent widget.

QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"), "/home/jana/untitled.png", tr("Images (*.png *.xpm *.jpg)"));

The file dialog's working directory will be set to dir. If dir includes a file name, the file will be selected. Only files that match the filter are shown. The filter selected is set to selectedFilter. The parameters dir, selectedFilter, and filter may be empty strings. Multiple filters are separated with ';;'. For instance:

"Images (*.png .xpm .jpg);;Text files (.txt);;XML files (.xml)"

The options argument holds various options about how to run the dialog, see the QFileDialog::Option enum for more information on the flags you can pass.

The default filter can be chosen by setting selectedFilter to the desired value.

The dialog's caption is set to caption. If caption is not specified, a default caption will be used.

On Windows, and macOS, this static function will use the native file dialog and not a QFileDialog.

On Windows the dialog will spin a blocking modal event loop that will not dispatch any QTimers, and if parent is not 0 then it will position the dialog just below the parent's title bar. On macOS, with its native file dialog, the filter argument is ignored.

On Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, the file dialog will change to /var/tmp after entering /usr/tmp. If options includes DontResolveSymlinks the file dialog will treat symlinks as regular directories.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFileDialog constructors.

See also getOpenFileName(), getOpenFileNames(), and getExistingDirectory().

pub unsafe fn get_save_file_name_0a() -> CppBox<QString>[src]

This is a convenience static function that will return a file name selected by the user. The file does not have to exist.

Calls C++ function: static QString QFileDialog::getSaveFileName().

C++ documentation:

This is a convenience static function that will return a file name selected by the user. The file does not have to exist.

It creates a modal file dialog with the given parent widget. If parent is not 0, the dialog will be shown centered over the parent widget.

QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"), "/home/jana/untitled.png", tr("Images (*.png *.xpm *.jpg)"));

The file dialog's working directory will be set to dir. If dir includes a file name, the file will be selected. Only files that match the filter are shown. The filter selected is set to selectedFilter. The parameters dir, selectedFilter, and filter may be empty strings. Multiple filters are separated with ';;'. For instance:

"Images (*.png .xpm .jpg);;Text files (.txt);;XML files (.xml)"

The options argument holds various options about how to run the dialog, see the QFileDialog::Option enum for more information on the flags you can pass.

The default filter can be chosen by setting selectedFilter to the desired value.

The dialog's caption is set to caption. If caption is not specified, a default caption will be used.

On Windows, and macOS, this static function will use the native file dialog and not a QFileDialog.

On Windows the dialog will spin a blocking modal event loop that will not dispatch any QTimers, and if parent is not 0 then it will position the dialog just below the parent's title bar. On macOS, with its native file dialog, the filter argument is ignored.

On Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, the file dialog will change to /var/tmp after entering /usr/tmp. If options includes DontResolveSymlinks the file dialog will treat symlinks as regular directories.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QFileDialog constructors.

See also getOpenFileName(), getOpenFileNames(), and getExistingDirectory().

pub unsafe fn get_save_file_url_7a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QUrl>>,
    filter: impl CastInto<Ref<QString>>,
    selected_filter: impl CastInto<Ptr<QString>>,
    options: QFlags<Option>,
    supported_schemes: impl CastInto<Ref<QStringList>>
) -> CppBox<QUrl>
[src]

This is a convenience static function that returns a file selected by the user. The file does not have to exist. If the user presses Cancel, it returns an empty url.

Calls C++ function: static QUrl QFileDialog::getSaveFileUrl(QWidget* parent = …, const QString& caption = …, const QUrl& dir = …, const QString& filter = …, QString* selectedFilter = …, QFlags<QFileDialog::Option> options = …, const QStringList& supportedSchemes = …).

C++ documentation:

This is a convenience static function that returns a file selected by the user. The file does not have to exist. If the user presses Cancel, it returns an empty url.

The function is used similarly to QFileDialog::getSaveFileName(). In particular parent, caption, dir, filter, selectedFilter and options are used in the exact same way.

The main difference with QFileDialog::getSaveFileName() comes from the ability offered to the user to select a remote file. That's why the return type and the type of dir is QUrl.

The supportedSchemes argument allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to save the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

When possible, this static function will use the native file dialog and not a QFileDialog. On platforms which don't support selecting remote files, Qt will allow to select only local files.

This function was introduced in Qt 5.2.

See also getSaveFileName(), getOpenFileUrl(), getOpenFileUrls(), and getExistingDirectoryUrl().

pub unsafe fn get_save_file_url_6a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QUrl>>,
    filter: impl CastInto<Ref<QString>>,
    selected_filter: impl CastInto<Ptr<QString>>,
    options: QFlags<Option>
) -> CppBox<QUrl>
[src]

This is a convenience static function that returns a file selected by the user. The file does not have to exist. If the user presses Cancel, it returns an empty url.

Calls C++ function: static QUrl QFileDialog::getSaveFileUrl(QWidget* parent = …, const QString& caption = …, const QUrl& dir = …, const QString& filter = …, QString* selectedFilter = …, QFlags<QFileDialog::Option> options = …).

C++ documentation:

This is a convenience static function that returns a file selected by the user. The file does not have to exist. If the user presses Cancel, it returns an empty url.

The function is used similarly to QFileDialog::getSaveFileName(). In particular parent, caption, dir, filter, selectedFilter and options are used in the exact same way.

The main difference with QFileDialog::getSaveFileName() comes from the ability offered to the user to select a remote file. That's why the return type and the type of dir is QUrl.

The supportedSchemes argument allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to save the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

When possible, this static function will use the native file dialog and not a QFileDialog. On platforms which don't support selecting remote files, Qt will allow to select only local files.

This function was introduced in Qt 5.2.

See also getSaveFileName(), getOpenFileUrl(), getOpenFileUrls(), and getExistingDirectoryUrl().

pub unsafe fn get_save_file_url_5a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QUrl>>,
    filter: impl CastInto<Ref<QString>>,
    selected_filter: impl CastInto<Ptr<QString>>
) -> CppBox<QUrl>
[src]

This is a convenience static function that returns a file selected by the user. The file does not have to exist. If the user presses Cancel, it returns an empty url.

Calls C++ function: static QUrl QFileDialog::getSaveFileUrl(QWidget* parent = …, const QString& caption = …, const QUrl& dir = …, const QString& filter = …, QString* selectedFilter = …).

C++ documentation:

This is a convenience static function that returns a file selected by the user. The file does not have to exist. If the user presses Cancel, it returns an empty url.

The function is used similarly to QFileDialog::getSaveFileName(). In particular parent, caption, dir, filter, selectedFilter and options are used in the exact same way.

The main difference with QFileDialog::getSaveFileName() comes from the ability offered to the user to select a remote file. That's why the return type and the type of dir is QUrl.

The supportedSchemes argument allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to save the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

When possible, this static function will use the native file dialog and not a QFileDialog. On platforms which don't support selecting remote files, Qt will allow to select only local files.

This function was introduced in Qt 5.2.

See also getSaveFileName(), getOpenFileUrl(), getOpenFileUrls(), and getExistingDirectoryUrl().

pub unsafe fn get_save_file_url_4a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QUrl>>,
    filter: impl CastInto<Ref<QString>>
) -> CppBox<QUrl>
[src]

This is a convenience static function that returns a file selected by the user. The file does not have to exist. If the user presses Cancel, it returns an empty url.

Calls C++ function: static QUrl QFileDialog::getSaveFileUrl(QWidget* parent = …, const QString& caption = …, const QUrl& dir = …, const QString& filter = …).

C++ documentation:

This is a convenience static function that returns a file selected by the user. The file does not have to exist. If the user presses Cancel, it returns an empty url.

The function is used similarly to QFileDialog::getSaveFileName(). In particular parent, caption, dir, filter, selectedFilter and options are used in the exact same way.

The main difference with QFileDialog::getSaveFileName() comes from the ability offered to the user to select a remote file. That's why the return type and the type of dir is QUrl.

The supportedSchemes argument allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to save the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

When possible, this static function will use the native file dialog and not a QFileDialog. On platforms which don't support selecting remote files, Qt will allow to select only local files.

This function was introduced in Qt 5.2.

See also getSaveFileName(), getOpenFileUrl(), getOpenFileUrls(), and getExistingDirectoryUrl().

pub unsafe fn get_save_file_url_3a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    dir: impl CastInto<Ref<QUrl>>
) -> CppBox<QUrl>
[src]

This is a convenience static function that returns a file selected by the user. The file does not have to exist. If the user presses Cancel, it returns an empty url.

Calls C++ function: static QUrl QFileDialog::getSaveFileUrl(QWidget* parent = …, const QString& caption = …, const QUrl& dir = …).

C++ documentation:

This is a convenience static function that returns a file selected by the user. The file does not have to exist. If the user presses Cancel, it returns an empty url.

The function is used similarly to QFileDialog::getSaveFileName(). In particular parent, caption, dir, filter, selectedFilter and options are used in the exact same way.

The main difference with QFileDialog::getSaveFileName() comes from the ability offered to the user to select a remote file. That's why the return type and the type of dir is QUrl.

The supportedSchemes argument allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to save the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

When possible, this static function will use the native file dialog and not a QFileDialog. On platforms which don't support selecting remote files, Qt will allow to select only local files.

This function was introduced in Qt 5.2.

See also getSaveFileName(), getOpenFileUrl(), getOpenFileUrls(), and getExistingDirectoryUrl().

pub unsafe fn get_save_file_url_2a(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>
) -> CppBox<QUrl>
[src]

This is a convenience static function that returns a file selected by the user. The file does not have to exist. If the user presses Cancel, it returns an empty url.

Calls C++ function: static QUrl QFileDialog::getSaveFileUrl(QWidget* parent = …, const QString& caption = …).

C++ documentation:

This is a convenience static function that returns a file selected by the user. The file does not have to exist. If the user presses Cancel, it returns an empty url.

The function is used similarly to QFileDialog::getSaveFileName(). In particular parent, caption, dir, filter, selectedFilter and options are used in the exact same way.

The main difference with QFileDialog::getSaveFileName() comes from the ability offered to the user to select a remote file. That's why the return type and the type of dir is QUrl.

The supportedSchemes argument allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to save the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

When possible, this static function will use the native file dialog and not a QFileDialog. On platforms which don't support selecting remote files, Qt will allow to select only local files.

This function was introduced in Qt 5.2.

See also getSaveFileName(), getOpenFileUrl(), getOpenFileUrls(), and getExistingDirectoryUrl().

pub unsafe fn get_save_file_url_1a(
    parent: impl CastInto<Ptr<QWidget>>
) -> CppBox<QUrl>
[src]

This is a convenience static function that returns a file selected by the user. The file does not have to exist. If the user presses Cancel, it returns an empty url.

Calls C++ function: static QUrl QFileDialog::getSaveFileUrl(QWidget* parent = …).

C++ documentation:

This is a convenience static function that returns a file selected by the user. The file does not have to exist. If the user presses Cancel, it returns an empty url.

The function is used similarly to QFileDialog::getSaveFileName(). In particular parent, caption, dir, filter, selectedFilter and options are used in the exact same way.

The main difference with QFileDialog::getSaveFileName() comes from the ability offered to the user to select a remote file. That's why the return type and the type of dir is QUrl.

The supportedSchemes argument allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to save the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

When possible, this static function will use the native file dialog and not a QFileDialog. On platforms which don't support selecting remote files, Qt will allow to select only local files.

This function was introduced in Qt 5.2.

See also getSaveFileName(), getOpenFileUrl(), getOpenFileUrls(), and getExistingDirectoryUrl().

pub unsafe fn get_save_file_url_0a() -> CppBox<QUrl>[src]

This is a convenience static function that returns a file selected by the user. The file does not have to exist. If the user presses Cancel, it returns an empty url.

Calls C++ function: static QUrl QFileDialog::getSaveFileUrl().

C++ documentation:

This is a convenience static function that returns a file selected by the user. The file does not have to exist. If the user presses Cancel, it returns an empty url.

The function is used similarly to QFileDialog::getSaveFileName(). In particular parent, caption, dir, filter, selectedFilter and options are used in the exact same way.

The main difference with QFileDialog::getSaveFileName() comes from the ability offered to the user to select a remote file. That's why the return type and the type of dir is QUrl.

The supportedSchemes argument allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to save the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

When possible, this static function will use the native file dialog and not a QFileDialog. On platforms which don't support selecting remote files, Qt will allow to select only local files.

This function was introduced in Qt 5.2.

See also getSaveFileName(), getOpenFileUrl(), getOpenFileUrls(), and getExistingDirectoryUrl().

pub unsafe fn history(&self) -> CppBox<QStringList>[src]

Returns the browsing history of the filedialog as a list of paths.

Calls C++ function: QStringList QFileDialog::history() const.

C++ documentation:

Returns the browsing history of the filedialog as a list of paths.

See also setHistory().

pub unsafe fn icon_provider(&self) -> Ptr<QFileIconProvider>[src]

Returns the icon provider used by the filedialog.

Calls C++ function: QFileIconProvider* QFileDialog::iconProvider() const.

C++ documentation:

Returns the icon provider used by the filedialog.

See also setIconProvider().

pub unsafe fn is_name_filter_details_visible(&self) -> bool[src]

This property holds whether the filter details is shown or not.

Calls C++ function: bool QFileDialog::isNameFilterDetailsVisible() const.

C++ documentation:

This property holds whether the filter details is shown or not.

When this property is true (the default), the filter details are shown in the combo box. When the property is set to false, these are hidden.

Use setOption(HideNameFilterDetails, !enabled) or !testOption(HideNameFilterDetails).

This property was introduced in Qt 4.4.

Access functions:

pub unsafe fn is_read_only(&self) -> bool[src]

This property holds whether the filedialog is read-only

Calls C++ function: bool QFileDialog::isReadOnly() const.

C++ documentation:

This property holds whether the filedialog is read-only

If this property is set to false, the file dialog will allow renaming, and deleting of files and directories and creating directories.

Use setOption(ReadOnly, enabled) or testOption(ReadOnly) instead.

Access functions:

bool isReadOnly() const
void setReadOnly(bool enabled)

pub unsafe fn item_delegate(&self) -> QPtr<QAbstractItemDelegate>[src]

Returns the item delegate used to render the items in the views in the filedialog.

Calls C++ function: QAbstractItemDelegate* QFileDialog::itemDelegate() const.

C++ documentation:

Returns the item delegate used to render the items in the views in the filedialog.

See also setItemDelegate().

pub unsafe fn label_text(&self, label: DialogLabel) -> CppBox<QString>[src]

Returns the text shown in the filedialog in the specified label.

Calls C++ function: QString QFileDialog::labelText(QFileDialog::DialogLabel label) const.

C++ documentation:

Returns the text shown in the filedialog in the specified label.

See also setLabelText().

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QFileDialog::metaObject() const.

pub unsafe fn mime_type_filters(&self) -> CppBox<QStringList>[src]

Returns the MIME type filters that are in operation on this file dialog.

Calls C++ function: QStringList QFileDialog::mimeTypeFilters() const.

C++ documentation:

Returns the MIME type filters that are in operation on this file dialog.

This function was introduced in Qt 5.2.

See also setMimeTypeFilters().

pub unsafe fn name_filters(&self) -> CppBox<QStringList>[src]

Returns the file type filters that are in operation on this file dialog.

Calls C++ function: QStringList QFileDialog::nameFilters() const.

C++ documentation:

Returns the file type filters that are in operation on this file dialog.

This function was introduced in Qt 4.4.

See also setNameFilters().

pub unsafe fn from_q_widget_q_flags_window_type(
    parent: impl CastInto<Ptr<QWidget>>,
    f: QFlags<WindowType>
) -> QBox<QFileDialog>
[src]

Constructs a file dialog with the given parent and widget flags.

Calls C++ function: [constructor] void QFileDialog::QFileDialog(QWidget* parent, QFlags<Qt::WindowType> f).

C++ documentation:

Constructs a file dialog with the given parent and widget flags.

pub unsafe fn from_q_widget3_q_string(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    directory: impl CastInto<Ref<QString>>,
    filter: impl CastInto<Ref<QString>>
) -> QBox<QFileDialog>
[src]

Constructs a file dialog with the given parent and caption that initially displays the contents of the specified directory. The contents of the directory are filtered before being shown in the dialog, using a semicolon-separated list of filters specified by filter.

Calls C++ function: [constructor] void QFileDialog::QFileDialog(QWidget* parent = …, const QString& caption = …, const QString& directory = …, const QString& filter = …).

C++ documentation:

Constructs a file dialog with the given parent and caption that initially displays the contents of the specified directory. The contents of the directory are filtered before being shown in the dialog, using a semicolon-separated list of filters specified by filter.

pub unsafe fn new() -> QBox<QFileDialog>[src]

The QFileDialog class provides a dialog that allow users to select files or directories.

Calls C++ function: [constructor] void QFileDialog::QFileDialog().

C++ documentation:

The QFileDialog class provides a dialog that allow users to select files or directories.

The QFileDialog class enables a user to traverse the file system in order to select one or many files or a directory.

The easiest way to create a QFileDialog is to use the static functions.

fileName = QFileDialog::getOpenFileName(this, tr("Open Image"), "/home/jana", tr("Image Files (*.png *.jpg *.bmp)"));

In the above example, a modal QFileDialog is created using a static function. The dialog initially displays the contents of the "/home/jana" directory, and displays files matching the patterns given in the string "Image Files (*.png *.jpg *.bmp)". The parent of the file dialog is set to this, and the window title is set to "Open Image".

If you want to use multiple filters, separate each one with two semicolons. For example:

"Images (*.png .xpm .jpg);;Text files (.txt);;XML files (.xml)"

You can create your own QFileDialog without using the static functions. By calling setFileMode(), you can specify what the user must select in the dialog:

QFileDialog dialog(this); dialog.setFileMode(QFileDialog::AnyFile);

In the above example, the mode of the file dialog is set to AnyFile, meaning that the user can select any file, or even specify a file that doesn't exist. This mode is useful for creating a "Save As" file dialog. Use ExistingFile if the user must select an existing file, or Directory if only a directory may be selected. See the QFileDialog::FileMode enum for the complete list of modes.

The fileMode property contains the mode of operation for the dialog; this indicates what types of objects the user is expected to select. Use setNameFilter() to set the dialog's file filter. For example:

dialog.setNameFilter(tr("Images (*.png *.xpm *.jpg)"));

In the above example, the filter is set to "Images (*.png *.xpm *.jpg)", this means that only files with the extension png, xpm, or jpg will be shown in the QFileDialog. You can apply several filters by using setNameFilters(). Use selectNameFilter() to select one of the filters you've given as the file dialog's default filter.

The file dialog has two view modes: List and Detail. List presents the contents of the current directory as a list of file and directory names. Detail also displays a list of file and directory names, but provides additional information alongside each name, such as the file size and modification date. Set the mode with setViewMode():

dialog.setViewMode(QFileDialog::Detail);

The last important function you will need to use when creating your own file dialog is selectedFiles().

QStringList fileNames; if (dialog.exec()) fileNames = dialog.selectedFiles();

In the above example, a modal file dialog is created and shown. If the user clicked OK, the file they selected is put in fileName.

The dialog's working directory can be set with setDirectory(). Each file in the current directory can be selected using the selectFile() function.

The Standard Dialogs example shows how to use QFileDialog as well as other built-in Qt dialogs.

By default, a platform-native file dialog will be used if the platform has one. In that case, the widgets which would otherwise be used to construct the dialog will not be instantiated, so related accessors such as layout() and itemDelegate() will return null. You can set the DontUseNativeDialog option to ensure that the widget-based implementation will be used instead of the native dialog.

pub unsafe fn from_q_widget2_q_string(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>,
    directory: impl CastInto<Ref<QString>>
) -> QBox<QFileDialog>
[src]

Constructs a file dialog with the given parent and caption that initially displays the contents of the specified directory. The contents of the directory are filtered before being shown in the dialog, using a semicolon-separated list of filters specified by filter.

Calls C++ function: [constructor] void QFileDialog::QFileDialog(QWidget* parent = …, const QString& caption = …, const QString& directory = …).

C++ documentation:

Constructs a file dialog with the given parent and caption that initially displays the contents of the specified directory. The contents of the directory are filtered before being shown in the dialog, using a semicolon-separated list of filters specified by filter.

pub unsafe fn from_q_widget_q_string(
    parent: impl CastInto<Ptr<QWidget>>,
    caption: impl CastInto<Ref<QString>>
) -> QBox<QFileDialog>
[src]

Constructs a file dialog with the given parent and caption that initially displays the contents of the specified directory. The contents of the directory are filtered before being shown in the dialog, using a semicolon-separated list of filters specified by filter.

Calls C++ function: [constructor] void QFileDialog::QFileDialog(QWidget* parent = …, const QString& caption = …).

C++ documentation:

Constructs a file dialog with the given parent and caption that initially displays the contents of the specified directory. The contents of the directory are filtered before being shown in the dialog, using a semicolon-separated list of filters specified by filter.

pub unsafe fn from_q_widget(
    parent: impl CastInto<Ptr<QWidget>>
) -> QBox<QFileDialog>
[src]

Constructs a file dialog with the given parent and caption that initially displays the contents of the specified directory. The contents of the directory are filtered before being shown in the dialog, using a semicolon-separated list of filters specified by filter.

Calls C++ function: [constructor] void QFileDialog::QFileDialog(QWidget* parent = …).

C++ documentation:

Constructs a file dialog with the given parent and caption that initially displays the contents of the specified directory. The contents of the directory are filtered before being shown in the dialog, using a semicolon-separated list of filters specified by filter.

pub unsafe fn open(
    &self,
    receiver: impl CastInto<Ptr<QObject>>,
    member: *const c_char
)
[src]

This function connects one of its signals to the slot specified by receiver and member. The specific signal depends is filesSelected() if fileMode is ExistingFiles and fileSelected() if fileMode is anything else.

Calls C++ function: void QFileDialog::open(QObject* receiver, const char* member).

C++ documentation:

This function connects one of its signals to the slot specified by receiver and member. The specific signal depends is filesSelected() if fileMode is ExistingFiles and fileSelected() if fileMode is anything else.

The signal will be disconnected from the slot when the dialog is closed.

This function was introduced in Qt 4.5.

pub unsafe fn options(&self) -> QFlags<Option>[src]

This property holds the various options that affect the look and feel of the dialog

Calls C++ function: QFlags<QFileDialog::Option> QFileDialog::options() const.

C++ documentation:

This property holds the various options that affect the look and feel of the dialog

By default, all options are disabled.

Options should be set before showing the dialog. Setting them while the dialog is visible is not guaranteed to have an immediate effect on the dialog (depending on the option and on the platform).

This property was introduced in Qt 4.5.

Access functions:

Options options() const
void setOptions(Options options)

See also setOption() and testOption().

pub unsafe fn proxy_model(&self) -> QPtr<QAbstractProxyModel>[src]

Returns the proxy model used by the file dialog. By default no proxy is set.

Calls C++ function: QAbstractProxyModel* QFileDialog::proxyModel() const.

C++ documentation:

Returns the proxy model used by the file dialog. By default no proxy is set.

See also setProxyModel().

pub unsafe fn qt_metacall(
    &self,
    arg1: Call,
    arg2: c_int,
    arg3: *mut *mut c_void
) -> c_int
[src]

Calls C++ function: virtual int QFileDialog::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

Calls C++ function: virtual void* QFileDialog::qt_metacast(const char* arg1).

This property holds whether the filedialog should resolve shortcuts

Calls C++ function: bool QFileDialog::resolveSymlinks() const.

C++ documentation:

This property holds whether the filedialog should resolve shortcuts

If this property is set to true, the file dialog will resolve shortcuts or symbolic links.

Use setOption(DontResolveSymlinks, !enabled) or !testOption(DontResolveSymlinks).

Access functions:

bool resolveSymlinks() const
void setResolveSymlinks(bool enabled)

pub unsafe fn restore_state(
    &self,
    state: impl CastInto<Ref<QByteArray>>
) -> bool
[src]

Restores the dialogs's layout, history and current directory to the state specified.

Calls C++ function: bool QFileDialog::restoreState(const QByteArray& state).

C++ documentation:

Restores the dialogs's layout, history and current directory to the state specified.

Typically this is used in conjunction with QSettings to restore the size from a past session.

Returns false if there are errors

This function was introduced in Qt 4.3.

pub unsafe fn save_file_content_2a(
    file_content: impl CastInto<Ref<QByteArray>>,
    file_name_hint: impl CastInto<Ref<QString>>
)
[src]

This is supported on cpp_lib_version="5.14.0" only.

This is a convenience static function that saves fileContent to a file, using a file name and location chosen by the user. fileNameHint can be provided to suggest a file name to the user.

Calls C++ function: static void QFileDialog::saveFileContent(const QByteArray& fileContent, const QString& fileNameHint = …).

C++ documentation:

This is a convenience static function that saves fileContent to a file, using a file name and location chosen by the user. fileNameHint can be provided to suggest a file name to the user.

This function is used to save files to the local file system on Qt for WebAssembly, where the web sandbox places restrictions on how such access may happen. Its implementation will make the browser display a native file dialog, where the user makes the file selection.

It can also be used on other platforms, where it will fall back to using QFileDialog.

The function is asynchronous and returns immediately.

  QByteArray imageData; // obtained from e.g. QImage::save()
  QFileDialog::saveFile("myimage.png", imageData);

This function was introduced in Qt 5.14.

pub unsafe fn save_file_content_1a(file_content: impl CastInto<Ref<QByteArray>>)[src]

This is supported on cpp_lib_version="5.14.0" only.

This is a convenience static function that saves fileContent to a file, using a file name and location chosen by the user. fileNameHint can be provided to suggest a file name to the user.

Calls C++ function: static void QFileDialog::saveFileContent(const QByteArray& fileContent).

C++ documentation:

This is a convenience static function that saves fileContent to a file, using a file name and location chosen by the user. fileNameHint can be provided to suggest a file name to the user.

This function is used to save files to the local file system on Qt for WebAssembly, where the web sandbox places restrictions on how such access may happen. Its implementation will make the browser display a native file dialog, where the user makes the file selection.

It can also be used on other platforms, where it will fall back to using QFileDialog.

The function is asynchronous and returns immediately.

  QByteArray imageData; // obtained from e.g. QImage::save()
  QFileDialog::saveFile("myimage.png", imageData);

This function was introduced in Qt 5.14.

pub unsafe fn save_state(&self) -> CppBox<QByteArray>[src]

Saves the state of the dialog's layout, history and current directory.

Calls C++ function: QByteArray QFileDialog::saveState() const.

C++ documentation:

Saves the state of the dialog's layout, history and current directory.

Typically this is used in conjunction with QSettings to remember the size for a future session. A version number is stored as part of the data.

This function was introduced in Qt 4.3.

pub unsafe fn select_file(&self, filename: impl CastInto<Ref<QString>>)[src]

Selects the given filename in the file dialog.

Calls C++ function: void QFileDialog::selectFile(const QString& filename).

C++ documentation:

Selects the given filename in the file dialog.

See also selectedFiles().

pub unsafe fn select_mime_type_filter(
    &self,
    filter: impl CastInto<Ref<QString>>
)
[src]

Sets the current MIME type filter.

Calls C++ function: void QFileDialog::selectMimeTypeFilter(const QString& filter).

C++ documentation:

Sets the current MIME type filter.

This function was introduced in Qt 5.2.

pub unsafe fn select_name_filter(&self, filter: impl CastInto<Ref<QString>>)[src]

Sets the current file type filter. Multiple filters can be passed in filter by separating them with semicolons or spaces.

Calls C++ function: void QFileDialog::selectNameFilter(const QString& filter).

C++ documentation:

Sets the current file type filter. Multiple filters can be passed in filter by separating them with semicolons or spaces.

This function was introduced in Qt 4.4.

See also setNameFilter(), setNameFilters(), and selectedNameFilter().

pub unsafe fn select_url(&self, url: impl CastInto<Ref<QUrl>>)[src]

Selects the given url in the file dialog.

Calls C++ function: void QFileDialog::selectUrl(const QUrl& url).

C++ documentation:

Selects the given url in the file dialog.

Note: The non-native QFileDialog supports only local files.

This function was introduced in Qt 5.2.

See also selectedUrls().

pub unsafe fn selected_files(&self) -> CppBox<QStringList>[src]

Returns a list of strings containing the absolute paths of the selected files in the dialog. If no files are selected, or the mode is not ExistingFiles or ExistingFile, selectedFiles() contains the current path in the viewport.

Calls C++ function: QStringList QFileDialog::selectedFiles() const.

C++ documentation:

Returns a list of strings containing the absolute paths of the selected files in the dialog. If no files are selected, or the mode is not ExistingFiles or ExistingFile, selectedFiles() contains the current path in the viewport.

See also selectedNameFilter() and selectFile().

pub unsafe fn selected_mime_type_filter(&self) -> CppBox<QString>[src]

Returns The mimetype of the file that the user selected in the file dialog.

Calls C++ function: QString QFileDialog::selectedMimeTypeFilter() const.

C++ documentation:

Returns The mimetype of the file that the user selected in the file dialog.

This function was introduced in Qt 5.9.

pub unsafe fn selected_name_filter(&self) -> CppBox<QString>[src]

Returns the filter that the user selected in the file dialog.

Calls C++ function: QString QFileDialog::selectedNameFilter() const.

C++ documentation:

Returns the filter that the user selected in the file dialog.

This function was introduced in Qt 4.4.

See also selectedFiles().

pub unsafe fn selected_urls(&self) -> CppBox<QListOfQUrl>[src]

Returns a list of urls containing the selected files in the dialog. If no files are selected, or the mode is not ExistingFiles or ExistingFile, selectedUrls() contains the current path in the viewport.

Calls C++ function: QList<QUrl> QFileDialog::selectedUrls() const.

C++ documentation:

Returns a list of urls containing the selected files in the dialog. If no files are selected, or the mode is not ExistingFiles or ExistingFile, selectedUrls() contains the current path in the viewport.

This function was introduced in Qt 5.2.

See also selectedNameFilter() and selectUrl().

pub unsafe fn set_accept_mode(&self, mode: AcceptMode)[src]

This property holds the accept mode of the dialog

Calls C++ function: void QFileDialog::setAcceptMode(QFileDialog::AcceptMode mode).

C++ documentation:

This property holds the accept mode of the dialog

The action mode defines whether the dialog is for opening or saving files.

By default, this property is set to AcceptOpen.

Access functions:

AcceptMode acceptMode() const
void setAcceptMode(AcceptMode mode)

See also AcceptMode.

pub unsafe fn set_confirm_overwrite(&self, enabled: bool)[src]

This property holds whether the filedialog should ask before accepting a selected file, when the accept mode is AcceptSave

Calls C++ function: void QFileDialog::setConfirmOverwrite(bool enabled).

C++ documentation:

This property holds whether the filedialog should ask before accepting a selected file, when the accept mode is AcceptSave

Use setOption(DontConfirmOverwrite, !enabled) or !testOption(DontConfirmOverwrite) instead.

Access functions:

bool confirmOverwrite() const
void setConfirmOverwrite(bool enabled)

pub unsafe fn set_default_suffix(&self, suffix: impl CastInto<Ref<QString>>)[src]

suffix added to the filename if no other suffix was specified

Calls C++ function: void QFileDialog::setDefaultSuffix(const QString& suffix).

C++ documentation:

suffix added to the filename if no other suffix was specified

This property specifies a string that will be added to the filename if it has no suffix already. The suffix is typically used to indicate the file type (e.g. "txt" indicates a text file).

If the first character is a dot ('.'), it is removed.

Access functions:

QString defaultSuffix() const
void setDefaultSuffix(const QString &suffix)

pub unsafe fn set_directory_q_string(
    &self,
    directory: impl CastInto<Ref<QString>>
)
[src]

Sets the file dialog's current directory.

Calls C++ function: void QFileDialog::setDirectory(const QString& directory).

C++ documentation:

Sets the file dialog's current directory.

Note: On iOS, if you set directory to QStandardPaths::standardLocations(QStandardPaths::PicturesLocation).last(), a native image picker dialog will be used for accessing the user's photo album. The filename returned can be loaded using QFile and related APIs. For this to be enabled, the Info.plist assigned to QMAKE_INFO_PLIST in the project file must contain the key NSPhotoLibraryUsageDescription. See Info.plist documentation from Apple for more information regarding this key. This feature was added in Qt 5.5.

See also directory().

pub unsafe fn set_directory_q_dir(&self, directory: impl CastInto<Ref<QDir>>)[src]

This is an overloaded function.

Calls C++ function: void QFileDialog::setDirectory(const QDir& directory).

C++ documentation:

This is an overloaded function.

pub unsafe fn set_directory_url(&self, directory: impl CastInto<Ref<QUrl>>)[src]

Sets the file dialog's current directory url.

Calls C++ function: void QFileDialog::setDirectoryUrl(const QUrl& directory).

C++ documentation:

Sets the file dialog's current directory url.

Note: The non-native QFileDialog supports only local files.

Note: On Windows, it is possible to pass URLs representing one of the virtual folders, such as "Computer" or "Network". This is done by passing a QUrl using the scheme clsid followed by the CLSID value with the curly braces removed. For example the URL clsid:374DE290-123F-4565-9164-39C4925E467B denotes the download location. For a complete list of possible values, see the MSDN documentation on KNOWNFOLDERID. This feature was added in Qt 5.5.

This function was introduced in Qt 5.2.

See also directoryUrl() and QUuid.

pub unsafe fn set_file_mode(&self, mode: FileMode)[src]

This property holds the file mode of the dialog

Calls C++ function: void QFileDialog::setFileMode(QFileDialog::FileMode mode).

C++ documentation:

This property holds the file mode of the dialog

The file mode defines the number and type of items that the user is expected to select in the dialog.

By default, this property is set to AnyFile.

This function will set the labels for the FileName and Accept DialogLabels. It is possible to set custom text after the call to setFileMode().

Access functions:

FileMode fileMode() const
void setFileMode(FileMode mode)

See also FileMode.

pub unsafe fn set_filter(&self, filters: QFlags<Filter>)[src]

Sets the filter used by the model to filters. The filter is used to specify the kind of files that should be shown.

Calls C++ function: void QFileDialog::setFilter(QFlags<QDir::Filter> filters).

C++ documentation:

Sets the filter used by the model to filters. The filter is used to specify the kind of files that should be shown.

This function was introduced in Qt 4.4.

See also filter().

pub unsafe fn set_history(&self, paths: impl CastInto<Ref<QStringList>>)[src]

Sets the browsing history of the filedialog to contain the given paths.

Calls C++ function: void QFileDialog::setHistory(const QStringList& paths).

C++ documentation:

Sets the browsing history of the filedialog to contain the given paths.

See also history().

pub unsafe fn set_icon_provider(
    &self,
    provider: impl CastInto<Ptr<QFileIconProvider>>
)
[src]

Sets the icon provider used by the filedialog to the specified provider.

Calls C++ function: void QFileDialog::setIconProvider(QFileIconProvider* provider).

C++ documentation:

Sets the icon provider used by the filedialog to the specified provider.

See also iconProvider().

pub unsafe fn set_item_delegate(
    &self,
    delegate: impl CastInto<Ptr<QAbstractItemDelegate>>
)
[src]

Sets the item delegate used to render items in the views in the file dialog to the given delegate.

Calls C++ function: void QFileDialog::setItemDelegate(QAbstractItemDelegate* delegate).

C++ documentation:

Sets the item delegate used to render items in the views in the file dialog to the given delegate.

Warning: You should not share the same instance of a delegate between views. Doing so can cause incorrect or unintuitive editing behavior since each view connected to a given delegate may receive the closeEditor() signal, and attempt to access, modify or close an editor that has already been closed.

Note that the model used is QFileSystemModel. It has custom item data roles, which is described by the Roles enum. You can use a QFileIconProvider if you only want custom icons.

See also itemDelegate(), setIconProvider(), and QFileSystemModel.

pub unsafe fn set_label_text(
    &self,
    label: DialogLabel,
    text: impl CastInto<Ref<QString>>
)
[src]

Sets the text shown in the filedialog in the specified label.

Calls C++ function: void QFileDialog::setLabelText(QFileDialog::DialogLabel label, const QString& text).

C++ documentation:

Sets the text shown in the filedialog in the specified label.

See also labelText().

pub unsafe fn set_mime_type_filters(
    &self,
    filters: impl CastInto<Ref<QStringList>>
)
[src]

Sets the filters used in the file dialog, from a list of MIME types.

Calls C++ function: void QFileDialog::setMimeTypeFilters(const QStringList& filters).

C++ documentation:

Sets the filters used in the file dialog, from a list of MIME types.

Convenience method for setNameFilters(). Uses QMimeType to create a name filter from the glob patterns and description defined in each MIME type.

Use application/octet-stream for the "All files (*)" filter, since that is the base MIME type for all files.

Calling setMimeTypeFilters overrides any previously set name filters, and changes the return value of nameFilters().

QStringList mimeTypeFilters; mimeTypeFilters << "image/jpeg" // will show "JPEG image (*.jpeg .jpg .jpe) << "image/png" // will show "PNG image (.png)" << "application/octet-stream"; // will show "All files ()"

QFileDialog dialog(this); dialog.setMimeTypeFilters(mimeTypeFilters); dialog.exec();

This function was introduced in Qt 5.2.

See also mimeTypeFilters().

pub unsafe fn set_name_filter(&self, filter: impl CastInto<Ref<QString>>)[src]

Sets the filter used in the file dialog to the given filter.

Calls C++ function: void QFileDialog::setNameFilter(const QString& filter).

C++ documentation:

Sets the filter used in the file dialog to the given filter.

If filter contains a pair of parentheses containing one or more filename-wildcard patterns, separated by spaces, then only the text contained in the parentheses is used as the filter. This means that these calls are all equivalent:

dialog.setNameFilter("All C++ files (*.cpp *.cc *.C *.cxx .c++)"); dialog.setNameFilter(".cpp *.cc *.C *.cxx *.c++");

This function was introduced in Qt 4.4.

See also setMimeTypeFilters() and setNameFilters().

pub unsafe fn set_name_filter_details_visible(&self, enabled: bool)[src]

This property holds whether the filter details is shown or not.

Calls C++ function: void QFileDialog::setNameFilterDetailsVisible(bool enabled).

C++ documentation:

This property holds whether the filter details is shown or not.

When this property is true (the default), the filter details are shown in the combo box. When the property is set to false, these are hidden.

Use setOption(HideNameFilterDetails, !enabled) or !testOption(HideNameFilterDetails).

This property was introduced in Qt 4.4.

Access functions:

pub unsafe fn set_name_filters(&self, filters: impl CastInto<Ref<QStringList>>)[src]

Sets the filters used in the file dialog.

Calls C++ function: void QFileDialog::setNameFilters(const QStringList& filters).

C++ documentation:

Sets the filters used in the file dialog.

Note that the filter *.* is not portable, 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 example, Makefile). In a native Windows file dialog, *.* will match such files, while in other types of file dialogs it may not. So it is better to use * if you mean to select any file.

QStringList filters; filters << "Image files (*.png .xpm .jpg)" << "Text files (.txt)" << "Any files ()";

QFileDialog dialog(this); dialog.setNameFilters(filters); dialog.exec();

setMimeTypeFilters() has the advantage of providing all possible name filters for each file type. For example, JPEG images have three possible extensions; if your application can open such files, selecting the image/jpeg mime type as a filter will allow you to open all of them.

This function was introduced in Qt 4.4.

See also nameFilters().

pub unsafe fn set_option_2a(&self, option: Option, on: bool)[src]

Sets the given option to be enabled if on is true; otherwise, clears the given option.

Calls C++ function: void QFileDialog::setOption(QFileDialog::Option option, bool on = …).

C++ documentation:

Sets the given option to be enabled if on is true; otherwise, clears the given option.

This function was introduced in Qt 4.5.

See also options and testOption().

pub unsafe fn set_option_1a(&self, option: Option)[src]

Sets the given option to be enabled if on is true; otherwise, clears the given option.

Calls C++ function: void QFileDialog::setOption(QFileDialog::Option option).

C++ documentation:

Sets the given option to be enabled if on is true; otherwise, clears the given option.

This function was introduced in Qt 4.5.

See also options and testOption().

pub unsafe fn set_options(&self, options: QFlags<Option>)[src]

This property holds the various options that affect the look and feel of the dialog

Calls C++ function: void QFileDialog::setOptions(QFlags<QFileDialog::Option> options).

C++ documentation:

This property holds the various options that affect the look and feel of the dialog

By default, all options are disabled.

Options should be set before showing the dialog. Setting them while the dialog is visible is not guaranteed to have an immediate effect on the dialog (depending on the option and on the platform).

This property was introduced in Qt 4.5.

Access functions:

Options options() const
void setOptions(Options options)

See also setOption() and testOption().

pub unsafe fn set_proxy_model(
    &self,
    model: impl CastInto<Ptr<QAbstractProxyModel>>
)
[src]

Sets the model for the views to the given proxyModel. This is useful if you want to modify the underlying model; for example, to add columns, filter data or add drives.

Calls C++ function: void QFileDialog::setProxyModel(QAbstractProxyModel* model).

C++ documentation:

Sets the model for the views to the given proxyModel. This is useful if you want to modify the underlying model; for example, to add columns, filter data or add drives.

Any existing proxy model will be removed, but not deleted. The file dialog will take ownership of the proxyModel.

This function was introduced in Qt 4.3.

See also proxyModel().

pub unsafe fn set_read_only(&self, enabled: bool)[src]

This property holds whether the filedialog is read-only

Calls C++ function: void QFileDialog::setReadOnly(bool enabled).

C++ documentation:

This property holds whether the filedialog is read-only

If this property is set to false, the file dialog will allow renaming, and deleting of files and directories and creating directories.

Use setOption(ReadOnly, enabled) or testOption(ReadOnly) instead.

Access functions:

bool isReadOnly() const
void setReadOnly(bool enabled)

This property holds whether the filedialog should resolve shortcuts

Calls C++ function: void QFileDialog::setResolveSymlinks(bool enabled).

C++ documentation:

This property holds whether the filedialog should resolve shortcuts

If this property is set to true, the file dialog will resolve shortcuts or symbolic links.

Use setOption(DontResolveSymlinks, !enabled) or !testOption(DontResolveSymlinks).

Access functions:

bool resolveSymlinks() const
void setResolveSymlinks(bool enabled)

pub unsafe fn set_sidebar_urls(&self, urls: impl CastInto<Ref<QListOfQUrl>>)[src]

Sets the urls that are located in the sidebar.

Calls C++ function: void QFileDialog::setSidebarUrls(const QList<QUrl>& urls).

C++ documentation:

Sets the urls that are located in the sidebar.

For instance:

QList<QUrl> urls; urls << QUrl::fromLocalFile("/Users/foo/Code/qt5") << QUrl::fromLocalFile(QStandardPaths::standardLocations(QStandardPaths::MusicLocation).first());

QFileDialog dialog; dialog.setSidebarUrls(urls); dialog.setFileMode(QFileDialog::AnyFile); if(dialog.exec()) { // ... }

The file dialog will then look like this:

This function was introduced in Qt 4.3.

See also sidebarUrls().

pub unsafe fn set_supported_schemes(
    &self,
    schemes: impl CastInto<Ref<QStringList>>
)
[src]

This property holds the URL schemes that the file dialog should allow navigating to.

Calls C++ function: void QFileDialog::setSupportedSchemes(const QStringList& schemes).

C++ documentation:

This property holds the URL schemes that the file dialog should allow navigating to.

Setting this property allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to fetch the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

This property was introduced in Qt 5.6.

Access functions:

QStringList supportedSchemes() const
void setSupportedSchemes(const QStringList &schemes)

pub unsafe fn set_view_mode(&self, mode: ViewMode)[src]

This property holds the way files and directories are displayed in the dialog

Calls C++ function: void QFileDialog::setViewMode(QFileDialog::ViewMode mode).

C++ documentation:

This property holds the way files and directories are displayed in the dialog

By default, the Detail mode is used to display information about files and directories.

Access functions:

ViewMode viewMode() const
void setViewMode(ViewMode mode)

See also ViewMode.

pub unsafe fn set_visible(&self, visible: bool)[src]

Reimplemented from QWidget::setVisible().

Calls C++ function: virtual void QFileDialog::setVisible(bool visible).

C++ documentation:

Reimplemented from QWidget::setVisible().

pub unsafe fn sidebar_urls(&self) -> CppBox<QListOfQUrl>[src]

Returns a list of urls that are currently in the sidebar

Calls C++ function: QList<QUrl> QFileDialog::sidebarUrls() const.

C++ documentation:

Returns a list of urls that are currently in the sidebar

This function was introduced in Qt 4.3.

See also setSidebarUrls().

pub unsafe fn static_meta_object() -> Ref<QMetaObject>[src]

Returns a reference to the staticMetaObject field.

pub unsafe fn supported_schemes(&self) -> CppBox<QStringList>[src]

This property holds the URL schemes that the file dialog should allow navigating to.

Calls C++ function: QStringList QFileDialog::supportedSchemes() const.

C++ documentation:

This property holds the URL schemes that the file dialog should allow navigating to.

Setting this property allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to fetch the file content. An empty list means that no restriction is applied (the default). Supported for local files ("file" scheme) is implicit and always enabled; it is not necessary to include it in the restriction.

This property was introduced in Qt 5.6.

Access functions:

QStringList supportedSchemes() const
void setSupportedSchemes(const QStringList &schemes)

pub unsafe fn test_option(&self, option: Option) -> bool[src]

Returns true if the given option is enabled; otherwise, returns false.

Calls C++ function: bool QFileDialog::testOption(QFileDialog::Option option) const.

C++ documentation:

Returns true if the given option is enabled; otherwise, returns false.

This function was introduced in Qt 4.5.

See also options and setOption().

pub unsafe fn tr(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QFileDialog::tr(const char* s, const char* c, int n).

pub unsafe fn tr_utf8(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QFileDialog::trUtf8(const char* s, const char* c, int n).

pub unsafe fn view_mode(&self) -> ViewMode[src]

This property holds the way files and directories are displayed in the dialog

Calls C++ function: QFileDialog::ViewMode QFileDialog::viewMode() const.

C++ documentation:

This property holds the way files and directories are displayed in the dialog

By default, the Detail mode is used to display information about files and directories.

Access functions:

ViewMode viewMode() const
void setViewMode(ViewMode mode)

See also ViewMode.

Methods from Deref<Target = QDialog>

pub fn finished(&self) -> Signal<(c_int,)>[src]

This signal is emitted when the dialog's result code has been set, either by the user or by calling done(), accept(), or reject().

Returns a built-in Qt signal QDialog::finished that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the dialog's result code has been set, either by the user or by calling done(), accept(), or reject().

Note that this signal is not emitted when hiding the dialog with hide() or setVisible(false). This includes deleting the dialog while it is visible.

This function was introduced in Qt 4.1.

See also accepted() and rejected().

pub fn accepted(&self) -> Signal<()>[src]

This signal is emitted when the dialog has been accepted either by the user or by calling accept() or done() with the QDialog::Accepted argument.

Returns a built-in Qt signal QDialog::accepted that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the dialog has been accepted either by the user or by calling accept() or done() with the QDialog::Accepted argument.

Note that this signal is not emitted when hiding the dialog with hide() or setVisible(false). This includes deleting the dialog while it is visible.

This function was introduced in Qt 4.1.

See also finished() and rejected().

pub fn rejected(&self) -> Signal<()>[src]

This signal is emitted when the dialog has been rejected either by the user or by calling reject() or done() with the QDialog::Rejected argument.

Returns a built-in Qt signal QDialog::rejected that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the dialog has been rejected either by the user or by calling reject() or done() with the QDialog::Rejected argument.

Note that this signal is not emitted when hiding the dialog with hide() or setVisible(false). This includes deleting the dialog while it is visible.

This function was introduced in Qt 4.1.

See also finished() and accepted().

pub fn slot_open(&self) -> Receiver<()>[src]

Shows the dialog as a window modal dialog, returning immediately.

Returns a built-in Qt slot QDialog::open that can be passed to qt_core::Signal::connect.

C++ documentation:

Shows the dialog as a window modal dialog, returning immediately.

This function was introduced in Qt 4.5.

See also exec(), show(), result(), and setWindowModality().

pub fn slot_exec(&self) -> Receiver<()>[src]

Shows the dialog as a modal dialog, blocking until the user closes it. The function returns a DialogCode result.

Returns a built-in Qt slot QDialog::exec that can be passed to qt_core::Signal::connect.

C++ documentation:

Shows the dialog as a modal dialog, blocking until the user closes it. The function returns a DialogCode result.

If the dialog is application modal, users cannot interact with any other window in the same application until they close the dialog. If the dialog is window modal, only interaction with the parent window is blocked while the dialog is open. By default, the dialog is application modal.

See also open(), show(), result(), and setWindowModality().

pub fn slot_done(&self) -> Receiver<(c_int,)>[src]

Closes the dialog and sets its result code to r. If this dialog is shown with exec(), done() causes the local event loop to finish, and exec() to return r.

Returns a built-in Qt slot QDialog::done that can be passed to qt_core::Signal::connect.

C++ documentation:

Closes the dialog and sets its result code to r. If this dialog is shown with exec(), done() causes the local event loop to finish, and exec() to return r.

As with QWidget::close(), done() deletes the dialog if the Qt::WA_DeleteOnClose flag is set. If the dialog is the application's main widget, the application terminates. If the dialog is the last window closed, the QApplication::lastWindowClosed() signal is emitted.

See also accept(), reject(), QApplication::activeWindow(), and QCoreApplication::quit().

pub fn slot_accept(&self) -> Receiver<()>[src]

Hides the modal dialog and sets the result code to Accepted.

Returns a built-in Qt slot QDialog::accept that can be passed to qt_core::Signal::connect.

C++ documentation:

Hides the modal dialog and sets the result code to Accepted.

See also reject() and done().

pub fn slot_reject(&self) -> Receiver<()>[src]

Hides the modal dialog and sets the result code to Rejected.

Returns a built-in Qt slot QDialog::reject that can be passed to qt_core::Signal::connect.

C++ documentation:

Hides the modal dialog and sets the result code to Rejected.

See also accept() and done().

pub fn slot_show_extension(&self) -> Receiver<(bool,)>[src]

If showIt is true, the dialog's extension is shown; otherwise the extension is hidden.

Returns a built-in Qt slot QDialog::showExtension that can be passed to qt_core::Signal::connect.

C++ documentation:

If showIt is true, the dialog's extension is shown; otherwise the extension is hidden.

Instead of using this functionality, we recommend that you simply call show() or hide() on the part of the dialog that you want to use as an extension. See the Extension Example for details.

See also show(), setExtension(), and setOrientation().

pub unsafe fn accept(&self)[src]

Hides the modal dialog and sets the result code to Accepted.

Calls C++ function: virtual [slot] void QDialog::accept().

C++ documentation:

Hides the modal dialog and sets the result code to Accepted.

See also reject() and done().

pub unsafe fn done(&self, arg1: c_int)[src]

Closes the dialog and sets its result code to r. If this dialog is shown with exec(), done() causes the local event loop to finish, and exec() to return r.

Calls C++ function: virtual [slot] void QDialog::done(int arg1).

C++ documentation:

Closes the dialog and sets its result code to r. If this dialog is shown with exec(), done() causes the local event loop to finish, and exec() to return r.

As with QWidget::close(), done() deletes the dialog if the Qt::WA_DeleteOnClose flag is set. If the dialog is the application's main widget, the application terminates. If the dialog is the last window closed, the QApplication::lastWindowClosed() signal is emitted.

See also accept(), reject(), QApplication::activeWindow(), and QCoreApplication::quit().

pub unsafe fn exec(&self) -> c_int[src]

Shows the dialog as a modal dialog, blocking until the user closes it. The function returns a DialogCode result.

Calls C++ function: virtual [slot] int QDialog::exec().

C++ documentation:

Shows the dialog as a modal dialog, blocking until the user closes it. The function returns a DialogCode result.

If the dialog is application modal, users cannot interact with any other window in the same application until they close the dialog. If the dialog is window modal, only interaction with the parent window is blocked while the dialog is open. By default, the dialog is application modal.

See also open(), show(), result(), and setWindowModality().

pub unsafe fn extension(&self) -> QPtr<QWidget>[src]

Returns the dialog's extension or 0 if no extension has been defined.

Calls C++ function: QWidget* QDialog::extension() const.

C++ documentation:

Returns the dialog's extension or 0 if no extension has been defined.

Instead of using this functionality, we recommend that you simply call show() or hide() on the part of the dialog that you want to use as an extension. See the Extension Example for details.

See also setExtension(), showExtension(), and setOrientation().

pub unsafe fn is_size_grip_enabled(&self) -> bool[src]

This property holds whether the size grip is enabled

Calls C++ function: bool QDialog::isSizeGripEnabled() const.

C++ documentation:

This property holds whether the size grip is enabled

A QSizeGrip is placed in the bottom-right corner of the dialog when this property is enabled. By default, the size grip is disabled.

Access functions:

bool isSizeGripEnabled() const
void setSizeGripEnabled(bool)

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QDialog::metaObject() const.

pub unsafe fn minimum_size_hint(&self) -> CppBox<QSize>[src]

Reimplemented from QWidget::minimumSizeHint().

Calls C++ function: virtual QSize QDialog::minimumSizeHint() const.

C++ documentation:

Reimplemented from QWidget::minimumSizeHint().

pub unsafe fn open(&self)[src]

Shows the dialog as a window modal dialog, returning immediately.

Calls C++ function: virtual [slot] void QDialog::open().

C++ documentation:

Shows the dialog as a window modal dialog, returning immediately.

This function was introduced in Qt 4.5.

See also exec(), show(), result(), and setWindowModality().

pub unsafe fn orientation(&self) -> Orientation[src]

Returns the dialog's extension orientation.

Calls C++ function: Qt::Orientation QDialog::orientation() const.

C++ documentation:

Returns the dialog's extension orientation.

Instead of using this functionality, we recommend that you simply call show() or hide() on the part of the dialog that you want to use as an extension. See the Extension Example for details.

See also setOrientation() and extension().

pub unsafe fn qt_metacall(
    &self,
    arg1: Call,
    arg2: c_int,
    arg3: *mut *mut c_void
) -> c_int
[src]

Calls C++ function: virtual int QDialog::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

Calls C++ function: virtual void* QDialog::qt_metacast(const char* arg1).

pub unsafe fn reject(&self)[src]

Hides the modal dialog and sets the result code to Rejected.

Calls C++ function: virtual [slot] void QDialog::reject().

C++ documentation:

Hides the modal dialog and sets the result code to Rejected.

See also accept() and done().

pub unsafe fn result(&self) -> c_int[src]

In general returns the modal dialog's result code, Accepted or Rejected.

Calls C++ function: int QDialog::result() const.

C++ documentation:

In general returns the modal dialog's result code, Accepted or Rejected.

Note: When called on a QMessageBox instance, the returned value is a value of the QMessageBox::StandardButton enum.

Do not call this function if the dialog was constructed with the Qt::WA_DeleteOnClose attribute.

See also setResult().

pub unsafe fn set_extension(&self, extension: impl CastInto<Ptr<QWidget>>)[src]

Sets the widget, extension, to be the dialog's extension, deleting any previous extension. The dialog takes ownership of the extension. Note that if 0 is passed any existing extension will be deleted. This function must only be called while the dialog is hidden.

Calls C++ function: void QDialog::setExtension(QWidget* extension).

C++ documentation:

Sets the widget, extension, to be the dialog's extension, deleting any previous extension. The dialog takes ownership of the extension. Note that if 0 is passed any existing extension will be deleted. This function must only be called while the dialog is hidden.

Instead of using this functionality, we recommend that you simply call show() or hide() on the part of the dialog that you want to use as an extension. See the Extension Example for details.

See also extension(), showExtension(), and setOrientation().

pub unsafe fn set_modal(&self, modal: bool)[src]

This property holds whether show() should pop up the dialog as modal or modeless

Calls C++ function: void QDialog::setModal(bool modal).

C++ documentation:

This property holds whether show() should pop up the dialog as modal or modeless

By default, this property is false and show() pops up the dialog as modeless. Setting this property to true is equivalent to setting QWidget::windowModality to Qt::ApplicationModal.

exec() ignores the value of this property and always pops up the dialog as modal.

Access functions:

bool isModal() const
void setModal(bool modal)

See also QWidget::windowModality, show(), and exec().

pub unsafe fn set_orientation(&self, orientation: Orientation)[src]

If orientation is Qt::Horizontal, the extension will be displayed to the right of the dialog's main area. If orientation is Qt::Vertical, the extension will be displayed below the dialog's main area.

Calls C++ function: void QDialog::setOrientation(Qt::Orientation orientation).

C++ documentation:

If orientation is Qt::Horizontal, the extension will be displayed to the right of the dialog's main area. If orientation is Qt::Vertical, the extension will be displayed below the dialog's main area.

Instead of using this functionality, we recommend that you simply call show() or hide() on the part of the dialog that you want to use as an extension. See the Extension Example for details.

See also orientation() and setExtension().

pub unsafe fn set_result(&self, r: c_int)[src]

Sets the modal dialog's result code to i.

Calls C++ function: void QDialog::setResult(int r).

C++ documentation:

Sets the modal dialog's result code to i.

Note: We recommend that you use one of the values defined by QDialog::DialogCode.

See also result().

pub unsafe fn set_size_grip_enabled(&self, arg1: bool)[src]

This property holds whether the size grip is enabled

Calls C++ function: void QDialog::setSizeGripEnabled(bool arg1).

C++ documentation:

This property holds whether the size grip is enabled

A QSizeGrip is placed in the bottom-right corner of the dialog when this property is enabled. By default, the size grip is disabled.

Access functions:

bool isSizeGripEnabled() const
void setSizeGripEnabled(bool)

pub unsafe fn set_visible(&self, visible: bool)[src]

Reimplemented from QWidget::setVisible().

Calls C++ function: virtual void QDialog::setVisible(bool visible).

C++ documentation:

Reimplemented from QWidget::setVisible().

pub unsafe fn show_extension(&self, arg1: bool)[src]

If showIt is true, the dialog's extension is shown; otherwise the extension is hidden.

Calls C++ function: [slot] void QDialog::showExtension(bool arg1).

C++ documentation:

If showIt is true, the dialog's extension is shown; otherwise the extension is hidden.

Instead of using this functionality, we recommend that you simply call show() or hide() on the part of the dialog that you want to use as an extension. See the Extension Example for details.

See also show(), setExtension(), and setOrientation().

pub unsafe fn size_hint(&self) -> CppBox<QSize>[src]

Reimplemented from QWidget::sizeHint().

Calls C++ function: virtual QSize QDialog::sizeHint() const.

C++ documentation:

Reimplemented from QWidget::sizeHint().

Trait Implementations

impl CppDeletable for QFileDialog[src]

unsafe fn delete(&self)[src]

Destroys the file dialog.

Calls C++ function: virtual [destructor] void QFileDialog::~QFileDialog().

C++ documentation:

Destroys the file dialog.

impl Deref for QFileDialog[src]

type Target = QDialog

The resulting type after dereferencing.

fn deref(&self) -> &QDialog[src]

Calls C++ function: QDialog* static_cast<QDialog*>(QFileDialog* ptr).

impl DynamicCast<QFileDialog> for QDialog[src]

unsafe fn dynamic_cast(ptr: Ptr<QDialog>) -> Ptr<QFileDialog>[src]

Calls C++ function: QFileDialog* dynamic_cast<QFileDialog*>(QDialog* ptr).

impl DynamicCast<QFileDialog> for QWidget[src]

unsafe fn dynamic_cast(ptr: Ptr<QWidget>) -> Ptr<QFileDialog>[src]

Calls C++ function: QFileDialog* dynamic_cast<QFileDialog*>(QWidget* ptr).

impl DynamicCast<QFileDialog> for QObject[src]

unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QFileDialog>[src]

Calls C++ function: QFileDialog* dynamic_cast<QFileDialog*>(QObject* ptr).

impl DynamicCast<QFileDialog> for QPaintDevice[src]

unsafe fn dynamic_cast(ptr: Ptr<QPaintDevice>) -> Ptr<QFileDialog>[src]

Calls C++ function: QFileDialog* dynamic_cast<QFileDialog*>(QPaintDevice* ptr).

impl StaticDowncast<QFileDialog> for QDialog[src]

unsafe fn static_downcast(ptr: Ptr<QDialog>) -> Ptr<QFileDialog>[src]

Calls C++ function: QFileDialog* static_cast<QFileDialog*>(QDialog* ptr).

impl StaticDowncast<QFileDialog> for QWidget[src]

unsafe fn static_downcast(ptr: Ptr<QWidget>) -> Ptr<QFileDialog>[src]

Calls C++ function: QFileDialog* static_cast<QFileDialog*>(QWidget* ptr).

impl StaticDowncast<QFileDialog> for QObject[src]

unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QFileDialog>[src]

Calls C++ function: QFileDialog* static_cast<QFileDialog*>(QObject* ptr).

impl StaticDowncast<QFileDialog> for QPaintDevice[src]

unsafe fn static_downcast(ptr: Ptr<QPaintDevice>) -> Ptr<QFileDialog>[src]

Calls C++ function: QFileDialog* static_cast<QFileDialog*>(QPaintDevice* ptr).

impl StaticUpcast<QDialog> for QFileDialog[src]

unsafe fn static_upcast(ptr: Ptr<QFileDialog>) -> Ptr<QDialog>[src]

Calls C++ function: QDialog* static_cast<QDialog*>(QFileDialog* ptr).

impl StaticUpcast<QObject> for QFileDialog[src]

unsafe fn static_upcast(ptr: Ptr<QFileDialog>) -> Ptr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(QFileDialog* ptr).

impl StaticUpcast<QPaintDevice> for QFileDialog[src]

unsafe fn static_upcast(ptr: Ptr<QFileDialog>) -> Ptr<QPaintDevice>[src]

Calls C++ function: QPaintDevice* static_cast<QPaintDevice*>(QFileDialog* ptr).

impl StaticUpcast<QWidget> for QFileDialog[src]

unsafe fn static_upcast(ptr: Ptr<QFileDialog>) -> Ptr<QWidget>[src]

Calls C++ function: QWidget* static_cast<QWidget*>(QFileDialog* ptr).

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.