Obsolete Members for QWebEngineDownloadItem
The following members of class QWebEngineDownloadItem are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.
Public Types
(obsolete) enum | DownloadType { Attachment, DownloadAttribute, UserRequested, SavePage } |
Public Functions
(obsolete) QString | path() const |
(obsolete) void | setPath(QString path) |
(obsolete) QWebEngineDownloadItem::DownloadType | type() const |
Member Type Documentation
enum QWebEngineDownloadItem::DownloadType
This enum is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
Describes the requested download's type.
Constant | Value | Description |
---|---|---|
QWebEngineDownloadItem::Attachment | 0 | The web server's response includes a Content-Disposition header with the attachment directive. If Content-Disposition is present in the reply, the web server is indicating that the client should prompt the user to save the content regardless of the content type. See RFC 2616 section 19.5.1 for details. |
QWebEngineDownloadItem::DownloadAttribute | 1 | The user clicked a link with the download attribute. |
QWebEngineDownloadItem::UserRequested | 2 | The user initiated the download, for example by selecting a web action. |
QWebEngineDownloadItem::SavePage | 3 | Saving of the current page was requested (for example by the QWebEnginePage::SavePage web action). |
This enum was introduced or modified in Qt 5.8.
Member Function Documentation
QString QWebEngineDownloadItem::path() const
This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
Use suggestedFileName(), downloadDirectory(), and downloadFileName() instead.
Returns the full target path where data is being downloaded to.
The path includes the file name. The default suggested path is the standard download location and file name is deduced not to overwrite already existing files.
See also setPath().
void QWebEngineDownloadItem::setPath(QString path)
This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
Use setDownloadDirectory() and setDownloadFileName() instead.
Sets the full target path to download the file to.
The path should also include the file name. The download path can only be set in response to the QWebEngineProfile::downloadRequested() signal before the download is accepted. Past that point, this function has no effect on the download item's state.
See also path().
QWebEngineDownloadItem::DownloadType QWebEngineDownloadItem::type() const
This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
Returns the requested download's type.
Note: This property works unreliably, except for SavePage
downloads. Use isSavePageDownload() instead.
This function was introduced in Qt 5.8.
© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.