下载错误 [英] Error downloading

查看:303
本文介绍了下载错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下载控制台会返回以下错误:

to download a console returns the following error:


框架加载被策略更改中断

Frame load interrupted by policy change

示例:

<a href="app.exe">Start Download</a>

控制台预览:

我应该在编译器 QWebSettings

推荐答案

我发现了。
在传统的Webkit浏览器中,下载控制台的位置显示了请求如何取消,所以在转到浏览器的下载管理器之前,请求应该被取消。

I discovered. In conventional Webkit browsers, the place to download the console shows how the request canceled, so before turning to "download manager" of the browser the request should be canceled.

解决方案:

//replace [QWebView] by your WebView
connect([QWebView]->page(), SIGNAL(unsupportedContent(QNetworkReply*)),
this, SLOT(downloadContent(QNetworkReply*)));

...

void [main class]::downloadContent(QNetworkReply *reply){
    //Replace "[main class]" by "Class" having the signs used in WebView.

    [QWebView]->stop();
    //solution: stop loading --replace [QWebView] by your WebView

    /*function to donwload*/
}

这篇关于下载错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆