QWebEngineView modify web content before render

2020-07-31 01:08发布

问题:

I have three questions about QWebengineView (Qt 5.7.0):

  1. How can I modify the web content (add extra html/javascript) during load (before render)

  2. How can I get events when javascript resource included in webpage is loading ( I want to modify them, too).

  3. I get html content by page()->toHtml then set it back by setHtml , but content rendered don't like original (seems to loss format)

Thanks for help!