7#include <QtWidgets/qtwidgetsglobal.h>
8#include <QtCore/qdir.h>
9#include <QtCore/qstring.h>
10#include <QtCore/qurl.h>
11#include <QtWidgets/qdialog.h>
49 ShowDirsOnly = 0x00000001,
50 DontResolveSymlinks = 0x00000002,
51 DontConfirmOverwrite = 0x00000004,
52 DontUseNativeDialog = 0x00000008,
53 ReadOnly = 0x00000010,
54 HideNameFilterDetails = 0x00000020,
55 DontUseCustomDirectoryIcons = 0x00000040
73 QUrl directoryUrl()
const;
75 void selectFile(
const QString &filename);
78 void selectUrl(
const QUrl &
url);
85 QString selectedMimeTypeFilter()
const;
86 QString selectedNameFilter()
const;
88#if QT_CONFIG(mimetype)
94 QDir::Filters
filter()
const;
95 void setFilter(QDir::Filters
filters);
98 ViewMode viewMode()
const;
101 FileMode fileMode()
const;
103 void setAcceptMode(AcceptMode
mode);
104 AcceptMode acceptMode()
const;
112 void setDefaultSuffix(
const QString &suffix);
127 void setSupportedSchemes(
const QStringList &schemes);
130#if QT_CONFIG(proxymodel)
137 void setOptions(
Options options);
163 QString *selectedFilter =
nullptr,
170 QString *selectedFilter =
nullptr,
178 QString *selectedFilter =
nullptr,
185 QString *selectedFilter =
nullptr,
192 Options options = ShowDirsOnly);
197 Options options = ShowDirsOnly,
204 QString *selectedFilter =
nullptr,
211 QString *selectedFilter =
nullptr,
215 static void getOpenFileContent(
const QString &nameFilter,
216 const std::function<
void(
const QString &,
const QByteArray &)> &fileContentsReady);
263{ setDirectory(adirectory.absolutePath()); }
The QAbstractItemDelegate class is used to display and edit data items from a model.
The QAbstractProxyModel class provides a base class for proxy item models that can do sorting,...
The QAction class provides an abstraction for user commands that can be added to different user inter...
The QDialog class is the base class of dialog windows.
virtual void done(int)
Closes the dialog and sets its result code to r.
virtual void accept()
Hides the modal dialog and sets the result code to Accepted.
The QFileDialog class provides a dialog that allow users to select files or directories.
FileMode
This enum is used to indicate what the user may select in the file dialog; i.e.
void currentChanged(const QString &path)
When the current file changes for local operations, this signal is emitted with the new file name as ...
void urlsSelected(const QList< QUrl > &urls)
When the selection changes and the dialog is accepted, this signal is emitted with the (possibly empt...
void filesSelected(const QStringList &files)
When the selection changes for local operations and the dialog is accepted, this signal is emitted wi...
void fileSelected(const QString &file)
When the selection changes for local operations and the dialog is accepted, this signal is emitted wi...
void currentUrlChanged(const QUrl &url)
When the current file changes, this signal is emitted with the new file URL as the url parameter.
void filterSelected(const QString &filter)
DialogLabel
\value LookIn \value FileName \value FileType \value Accept \value Reject
void urlSelected(const QUrl &url)
When the selection changes and the dialog is accepted, this signal is emitted with the (possibly empt...
AcceptMode
\value AcceptOpen \value AcceptSave
void directoryUrlEntered(const QUrl &directory)
This signal is emitted when the user enters a directory.
ViewMode
This enum describes the view mode of the file dialog; i.e.
void directoryEntered(const QString &directory)
\inmodule QtCore\reentrant
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
#define Q_DECLARE_FLAGS(Flags, Enum)
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
GLsizei const GLuint * paths
GLuint GLsizei const GLchar * label
[43]
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
GLsizei const GLchar *const * path
#define QT_REQUIRE_CONFIG(feature)
QSqlQueryModel * model
[16]
QUrl url("example.com")
[constructor-url-reference]
QStringList mimeTypeFilters({"image/jpeg", "image/png", "application/octet-stream" })
[12]
dialog setViewMode(QFileDialog::Detail)
[3]
dialog setNameFilter(tr("Images (*.png *.xpm *.jpg)"))
[2]
dialog setMimeTypeFilters(mimeTypeFilters)
dialog setNameFilters(filters)
dialog setFileMode(QFileDialog::AnyFile)
const QStringList filters({"Image files (*.png *.xpm *.jpg)", "Text files (*.txt)", "Any files (*)" })
[6]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent