QWebPage. How to handle failed request.
Posted
by
user453482
on Stack Overflow
See other posts from Stack Overflow
or by user453482
Published on 2010-09-21T05:36:48Z
Indexed on
2010/12/27
9:53 UTC
Read the original article
Hit count: 232
I want to handle failed requests (for example, with http 404 error code in reply), display my own "notfound.html" page in QWebView. But there is no simple way to handle replies with QWebView/QWebPage classes.
As I see in Arora browser, for such requests uses next mechanism: QWebPage::setForwardUnsupportedContent(true), QWebPage::unsupportedContent signal and appropriate slot where you can handle qnetworkreply manually. But I cannot understand how it works, because unsupportedContent throws only when QWebPage cannot handle request scheme (like abrakadra://, ftp://, etc) or if reply consists of special header Content-Disposition: attachment.
May be anybody know something about this ?
© Stack Overflow or respective owner