Can Qt's QWebView display programatically generated XML?
Posted
by Dan Ellis
on Stack Overflow
See other posts from Stack Overflow
or by Dan Ellis
Published on 2010-05-13T08:02:35Z
Indexed on
2010/05/13
8:04 UTC
Read the original article
Hit count: 301
Using Qt 4.6, I can dynamically add to an HTML page like this:
ui->webView->page()->mainFrame()->documentElement().findFirst("body").appendInside("<i>some text</i>\n");
However, if I QWebView::load() an XML file, it displays it with the correct CSS styling (from an processing instruction), but doesn't show any changes when I do something like:
ui->webView->page()->mainFrame()->documentElement().findFirst("lines").appendInside("<line>hello</line>\n");
Why is it treating them differently, and is there a way to modify an XML document in the same way I can an HTML one?
© Stack Overflow or respective owner