Obsolete Members for WebEngineDownloadItem

The following members of QML type WebEngineDownloadItem 已過時。 提供它們是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它們。

特性

特性文檔編製

id : int

保存下載項的 ID。

[read-only] interruptReason : enumeration

返迴下載為什麼中斷的原因:

常量 描述
WebEngineDownloadItem.NoReason 未知原因或未中斷。
WebEngineDownloadItem.FileFailed 常規文件操作故障。
WebEngineDownloadItem.FileAccessDenied 文件無法在本地寫入,由於訪問限定。
WebEngineDownloadItem.FileNoSpace 目標驅動器空間不足。
WebEngineDownloadItem.FileNameTooLong 目錄或文件名太長。
WebEngineDownloadItem.FileTooLarge 文件大小超過文件係統限製。
WebEngineDownloadItem.FileVirusInfected 文件被病毒感染。
WebEngineDownloadItem.FileTransientError 臨時問題 (例如:文件在使用中、內存不足或一次打開太多文件)。
WebEngineDownloadItem.FileBlocked 文件被阻塞由於本地策略。
WebEngineDownloadItem.FileSecurityCheckFailed 試圖檢查下載失敗的安全性,由於意外原因。
WebEngineDownloadItem.FileTooShort 嘗試尋址超齣文件末尾,當打開文件時 (作為再繼續先前被中斷下載的一部分)。
WebEngineDownloadItem.FileHashMismatch 部分文件不匹配預期哈希。
WebEngineDownloadItem.NetworkFailed 常規網絡故障。
WebEngineDownloadItem.NetworkTimeout 網絡操作已超時。
WebEngineDownloadItem.NetworkDisconnected 網絡連接已被終止。
WebEngineDownloadItem.NetworkServerDown 服務器宕機。
WebEngineDownloadItem.NetworkInvalidRequest 網絡請求無效 (例如:原始或重定嚮 URL 無效,方案不受支持或被策略禁止)。
WebEngineDownloadItem.ServerFailed 常規服務器故障。
WebEngineDownloadItem.ServerBadContent 服務器沒有請求的數據。
WebEngineDownloadItem.ServerUnauthorized 服務器未授權訪問資源。
WebEngineDownloadItem.ServerCertProblem 服務器證書發生問題。
WebEngineDownloadItem.ServerForbidden 訪問被服務器禁止。
WebEngineDownloadItem.ServerUnreachable 意外服務器響應 (可能指示響應服務器,可能不是企圖服務器)。
WebEngineDownloadItem.UserCanceled 用戶取消下載。

This property was introduced in QtWebEngine 1.5.

另請參閱 interruptReasonString .

interruptReasonString : string

返迴人類可讀的中斷下載原因的描述。

This property was introduced in QtWebEngine 1.5.

另請參閱 interruptReason .

[read-only] isFinished : bool

Whether this download is finished (completed, cancelled, or non-resumable interrupted state).

This property was introduced in QtWebEngine 1.6.

[read-only] isPaused : bool

Whether this download is paused.

This property was introduced in QtWebEngine 1.6.

另請參閱 pause and resume .

[read-only] isSavePageDownload : bool

Whether this is a download request for saving a web page or a file.

該特性在 QtWebEngine 1.7 引入。

另請參閱 savePageFormat .

mimeType : string

保存下載的 MIME 類型。

This property was introduced in QtWebEngine 1.2.

path : string

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() .

receivedBytes : int

Holds the amount of data in bytes that has been downloaded so far.

savePageFormat : enumeration

描述用於保存網頁的格式。

常量 描述
WebEngineDownloadItem.UnknownSaveFormat 這不是下載完整網頁的請求。
WebEngineDownloadItem.SingleHtmlSaveFormat 頁麵被另存為單 HTML 頁麵。圖像等資源不被保存。
WebEngineDownloadItem.CompleteHtmlSaveFormat 頁麵被另存為完整 HTML 頁麵,例如:目錄包含單 HTML 頁麵和資源。
WebEngineDownloadItem.MimeHtmlSaveFormat 以 MIME HTML 格式,把頁麵另存為完整網頁。

該特性在 QtWebEngine 1.3 引入。

state : enumeration

描述下載的狀態:

常量 描述
WebEngineDownloadItem.DownloadRequested 已請求下載,但尚未被接受。
WebEngineDownloadItem.DownloadInProgress 下載正在進行中。
WebEngineDownloadItem.DownloadCompleted 下載成功完成。
WebEngineDownloadItem.DownloadCancelled 下載被用戶取消。
WebEngineDownloadItem.DownloadInterrupted 下載已被中斷 (由服務器或由於丟失連接)。

totalBytes : int

保存要下載的數據總量 (以字節為單位)。

-1 意味著總尺寸未知。

[read-only] view : WebEngineView

Returns the view the download was requested on. If the download was not triggered by content in a view, nullptr 被返迴。

This property was introduced in QtWebEngine 1.8.

另請參閱 WebEngineView .