Manipulate DOM model in QWebView before rendering

  • I need to manipulate DOM model before is rendered. Let's assume I need to remove all <img> before I show them.

    If I try with QWebPage::loadFinished() it will be to late and I will see flick.
    If I try with QWebPage::initialLayoutCompleted() I end up with some images removed and most of 'em not.

    I also tried approach with NetworkAccessManager::networkAccessManagerFinishedReply(reply) but when I try to use webview in a networkAccessManagerFinishedReply I end up with empty "toHtml()" which is understandable because we've just got a request packet and we're not in a state where it was sent to webview. Maybe there's option to edit packet in FinishedReply?

    Any ideas?

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.