Obsolete Members for WebEngineDownloadItem

The following members of QML type WebEngineDownloadItem 已过时。 提供它们是为使旧源代码能继续工作。强烈建议不要在新代码中使用它们。

特性

特性文档编制

path : string

This property is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

使用 suggestedFileName , downloadDirectory ,和 downloadFileName 代替。

Holds 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.

The download path can only be set in the downloadRequested handler before the download is accepted.

另请参阅 WebEngineProfile::downloadRequested() and accept() .

[read-only] type : enumeration

This property is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

描述请求下载的类型。

注意: This property works unreliably, except for SavePage downloads. Use isSavePageDownload 代替。

常量 描述
WebEngineDownloadItem.Attachment Web 服务器的响应包括 Content-Disposition 头具有 attachment 指令。若 Content-Disposition 存在于回复中,Web 服务器指示客户端应该提示用户保存内容,不管内容类型。见 RFC 2616 第 19.5.1 节 了解细节。
WebEngineDownloadItem.DownloadAttribute 用户点击的链接具有 download 属性。
WebEngineDownloadItem.UserRequested 用户初启下载,例如通过选择 Web 操作。
WebEngineDownloadItem.SavePage 请求保存当前页面 (例如通过 WebEngineView.SavePage Web 动作)。

This property was introduced in QtWebEngine 1.4.