6#include <QtCore/qfileinfo.h>
7#include <QtGui/qpa/qplatformtheme.h>
8#include <QtQml/QQmlFile>
9#include <QtQml/qqmlexpression.h>
10#include <QtQuick/private/qquicklistview_p.h>
11#include <QtQuickTemplates2/private/qquickitemdelegate_p_p.h>
39 qmlAttachedPropertiesObject<QQuickListView>(
q));
47 bool converted =
false;
48 const int index =
q->property(
"index").toInt(&converted);
61 if (fileInfo.
isDir()) {
77 emit openButton->clicked();
117 d->fileDialog = qobject_cast<QQuickFileDialogImpl*>(
dialog);
118 d->folderDialog = qobject_cast<QQuickFolderDialogImpl*>(
dialog);
136 if (driveColonIndex == 2) {
137 path.replace(1, 1,
path.at(1).toUpper());
138 adjustedFile.setPath(
path);
141 if (adjustedFile ==
d->file)
144 d->file = adjustedFile;
163#include "moc_qquickfiledialogdelegate_p.cpp"
bool isDir() const
Returns true if this object points to a directory or to a symbolic link to a directory.
The QKeyEvent class describes a key event.
static QMetaObject::Connection connect(const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
The QQmlContext class defines a context within a QML engine.
static QString urlToLocalFileOrQrc(const QString &)
If url is a local file returns a path suitable for passing to \l{QFile}.
virtual void accept()
\qmlmethod void QtQuick.Controls::Dialog::accept()
QQuickFileDialogImpl * fileDialog
QQuickFolderDialogImpl * folderDialog
bool acceptKeyClick(Qt::Key key) const override
void setFile(const QUrl &file)
void setDialog(QQuickDialog *dialog)
void keyReleaseEvent(QKeyEvent *event) override
This event handler can be reimplemented in a subclass to receive key release events for an item.
QQuickFileDialogDelegate(QQuickItem *parent=nullptr)
QQuickDialogButtonBox * buttonBox
static QQuickFileDialogImplPrivate * get(QQuickFileDialogImpl *dialog)
void setSelectedFile(const QUrl &file)
void setCurrentFolder(const QUrl ¤tFolder, SetReason setReason=SetReason::External)
void setSelectedFolder(const QUrl &selectedFolder)
void setCurrentFolder(const QUrl &folder)
void setCurrentIndex(int idx)
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
virtual void keyReleaseEvent(QKeyEvent *event)
This event handler can be reimplemented in a subclass to receive key release events for an item.
void setFocusPolicy(Qt::FocusPolicy policy)
Sets the focus policy of this item to policy.
\macro QT_RESTRICTED_CAST_FROM_ASCII
qsizetype indexOf(QLatin1StringView s, qsizetype from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Combined button and popup list for selecting options.
DBusConnection * connection
GLdouble GLdouble GLdouble GLdouble q
GLsizei const GLchar *const * path
QQmlContext * qmlContext(const QObject *obj)
myObject disconnect()
[26]
QFileDialog dialog(this)
[1]
\inmodule QtCore \reentrant