7#include <QtWidgets/qfiledialog.h>
20 emit fileSelected(QUrl::fromLocalFile(file));
24 urls.reserve(files.size());
25 for (const QString &file : files)
26 urls += QUrl::fromLocalFile(file);
27 emit filesSelected(urls);
30 emit currentChanged(QUrl::fromLocalFile(path));
109#include "moc_qwidgetplatformfiledialog_p.cpp"
virtual int exec()
Shows the dialog as a \l{QDialog::Modal Dialogs}{modal dialog}, blocking until the user closes it.
bool isLabelExplicitlySet(DialogLabel label)
QString labelText(DialogLabel label) const
AcceptMode acceptMode() const
QString defaultSuffix() const
QStringList nameFilters() const
FileDialogOptions options() const
FileMode fileMode() const
QString windowTitle() const
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 ...
QString selectedNameFilter() const
void setDefaultSuffix(const QString &suffix)
void filesSelected(const QStringList &files)
When the selection changes for local operations and the dialog is accepted, this signal is emitted wi...
void setNameFilters(const QStringList &filters)
QUrl directoryUrl() const
Returns the url of the directory currently being displayed in the dialog.
void fileSelected(const QString &file)
When the selection changes for local operations and the dialog is accepted, this signal is emitted wi...
void filterSelected(const QString &filter)
void setAcceptMode(AcceptMode mode)
void selectNameFilter(const QString &filter)
void setDirectory(const QString &directory)
Sets the file dialog's current directory.
void selectUrl(const QUrl &url)
Selects the given url in the file dialog.
void setFileMode(FileMode mode)
AcceptMode
\value AcceptOpen \value AcceptSave
void setLabelText(DialogLabel label, const QString &text)
Sets the text shown in the filedialog in the specified label.
QList< QUrl > selectedUrls() const
Returns a list of urls containing the selected files in the dialog.
void setOptions(Options options)
void directoryEntered(const QString &directory)
QObject * parent() const
Returns a pointer to the parent object.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
void setParent(QObject *parent)
Makes the object a child of parent.
T * data() const noexcept
Returns the value of the pointer referenced by this object.
\macro QT_RESTRICTED_CAST_FROM_ASCII
QString toLocalFile() const
Returns the path of this URL formatted as a local file path.
Combined button and popup list for selecting options.
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
GLsizei const GLchar *const * path
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent