Display QDomDocument as HTML
EDIT
Bounty goes to a decent FOSS-licensed function which will do the conversion.
I have a QDomDocument which is HTML and I want to render it in a widget.
There are loads of QtWebkit classes but they don't seem to use QDom* classes -- QWebPage uses QWebFrame which uses QWebElement.
Is it possible to render the QDomDocument except by saving it to an XML string and then parsi开发者_StackOverflow社区ng it back into a QWeb* class? That seems silly.
QtWebKit is 3-rd party element (Qt port of WebKit engine), and until Qt 4.7 doesn't have anything to do with QtXml module (possibly to keep them binary separate). So either you change your code to create QWebElement's or you will print it to XML and parse again or you will create your own function that traverses your QDomElement tree and create apropriate QWebElement tree.
精彩评论