Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qquickfiledialogdelegate_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QQUICKFILEDIALOGDELEGATE_P_H
5#define QQUICKFILEDIALOGDELEGATE_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtQuickTemplates2/private/qquickitemdelegate_p.h>
19
21
23
24class QQuickDialog;
26
27class Q_QUICKDIALOGS2QUICKIMPL_PRIVATE_EXPORT QQuickFileDialogDelegate : public QQuickItemDelegate
28{
30 Q_PROPERTY(QQuickDialog *dialog READ dialog WRITE setDialog NOTIFY dialogChanged)
31 Q_PROPERTY(QUrl file READ file WRITE setFile NOTIFY fileChanged)
32 QML_NAMED_ELEMENT(FileDialogDelegate)
34
35public:
36 explicit QQuickFileDialogDelegate(QQuickItem *parent = nullptr);
37
38 QQuickDialog *dialog() const;
39 void setDialog(QQuickDialog *dialog);
40
41 QUrl file() const;
42 void setFile(const QUrl &file);
43
47
48protected:
49 void keyReleaseEvent(QKeyEvent *event) override;
50
51private:
52 Q_DISABLE_COPY(QQuickFileDialogDelegate)
53 Q_DECLARE_PRIVATE(QQuickFileDialogDelegate)
54};
55
57
59
60#endif // QQUICKFILEDIALOGDELEGATE_P_H
The QKeyEvent class describes a key event.
Definition qevent.h:423
void keyReleaseEvent(QKeyEvent *event) override
This event handler can be reimplemented in a subclass to receive key release events for an item.
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:64
\inmodule QtCore
Definition qurl.h:94
Combined button and popup list for selecting options.
struct _cl_event * event
#define QML_DECLARE_TYPE(TYPE)
Definition qqml.h:19
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SIGNALS
QFile file
[0]
info setFile("/etc/hosts")
QFileDialog dialog(this)
[1]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent