我有从网页打开的弹出窗口(它的贝宝弹出窗口)我捕获它,然后我尝试修复这个错误,因为这里的文档建议http://qt-project.org/doc/note_revisions/84/125/view
但我仍然收到此错误是我的 QWebView 类
class WebView : public QWebView
{
Q_OBJECT
public:
WebView()
{
connect( this->page()->networkAccessManager(),
SIGNAL(sslErrors(QNetworkReply*, const QList<QSslError> & )),
this,
SLOT(sslErrorHandler(QNetworkReply*, const QList<QSslError> & )));
}
private slots:
void sslErrorHandler( QNetworkReply *reply, const QList<QSslError> &errors)
{
qDebug() << "sslErrorHandler:";
foreach (QSslError err, errors)
qDebug() << "ssl error: " << err;
reply->ignoreSslErrors();
}
protected:
QWebView *createWindow(QWebPage::WebWindowType type)
{
QWebView *webview = new QWebView;
QUrl tmpUrl = webview->url();
QNetworkRequest request(tmpUrl);
//request.setHeader(QNetworkRequest::ContentTypeHeader,QVariant("application/x-www-form-urlencoded"));
request.setHeader(QNetworkRequest::ContentTypeHeader,"application/octet-stream");
//webview->show();
webview->load(request,QNetworkAccessManager::PostOperation);
return webview;
}
};
我在这里做错了什么?