The QWebEngineFileSystemAccessRequest class enables accepting or rejecting requests for local file system access from JavaScript applications. More...
Header: | #include <QWebEngineFileSystemAccessRequest> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS WebEngineCore) target_link_libraries(mytarget PRIVATE Qt6::WebEngineCore) |
qmake: | QT += webenginecore |
Since: | Qt 6.4 |
flags | AccessFlags |
void | accept() |
QWebEngineFileSystemAccessRequest::AccessFlags | accessFlags() const |
QUrl | filePath() const |
QWebEngineFileSystemAccessRequest::HandleType | handleType() const |
QUrl | origin() const |
void | reject() |
bool | operator!=(const QWebEngineFileSystemAccessRequest &lhs, const QWebEngineFileSystemAccessRequest &rhs) |
bool | operator==(const QWebEngineFileSystemAccessRequest &lhs, const QWebEngineFileSystemAccessRequest &rhs) |
To allow web applications to access local files of the computer, applications must connect to QWebEnginePage::fileSystemAccessRequested, which takes a QWebEngineFileSystemAccessRequest instance as an argument.
If a web applications requests access to local files or directories, QWebEnginePage::fileSystemAccessRequested will be emitted with an QWebEngineFileSystemAccessRequest instance as an argument where accessFlags() indicates the type of the requested access: read, write or both. The signal handler needs to then either call accept() or reject().
[read-only]
accessFlags : const AccessFlagsContains the requested file access rights.
Access functions:
QWebEngineFileSystemAccessRequest::AccessFlags | accessFlags() const |
[read-only]
filePath : const QUrlReturns the file path this file system access request is referring to.
Access functions:
QUrl | filePath() const |
[read-only]
handleType : const HandleTypeReturns the type of the requested file system entry. (File or directory)
Access functions:
QWebEngineFileSystemAccessRequest::HandleType | handleType() const |
[read-only]
origin : const QUrlThis property holds the URL of the web page that issued the file system access request.
Access functions:
QUrl | origin() const |
[invokable]
void QWebEngineFileSystemAccessRequest::accept()Accepts the request to access local files.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
[invokable]
void QWebEngineFileSystemAccessRequest::reject()Rejects a request to access local files.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
Returns true
if lhs and rhs point to different requests.
Returns true
if lhs and rhs both point to the same request.