You can do it using the easy way:
webView->page()->mainFrame()->evaluateJavaScript("document.body.innerHTML += [your code]");

Using scripts you can dynamically "talk" with the HTML DOM.

in the [your code] i'm using a "window.bridge.code" with addToJavaScriptWindowObject.

But you can simples put your text there, or use "document.body.innerHTML += '" + code + "';";

^^