Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. Manipulate DOM model in QWebView before rendering
Forum Updated to NodeBB v4.3 + New Features

Manipulate DOM model in QWebView before rendering

Scheduled Pinned Locked Moved Qt WebKit
1 Posts 1 Posters 2.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pacanek
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved