How to abort loading a URL in QTWebkit
How to abort loading a URL when timeout? For example, if a start load a URL with :
const char *szUrl = "http://www.google.com";
QUrl qUrl = QUrl(szUrl);
If there is no response and timeout ,how can I abort this request?
Thanks and Regards,
AFAIK thats not possible...at least with the QWebView API.
You need a QNetworkReply instance to abort a network transfer. But the API doesn't expose it anywhere.
Thus you you would need to subclass QNetworkAccessManager and reimplement QNAM::createRequest() and do it there. Then set your custom QNAM to the QWebPage.
//QWebPage::Stop 10 Stop loading the current page.
void QWebView::stop () [slot]
//Convenience slot that stops loading the document.
//It is equivalent to