Inline SVG support in QtWebKit embedded
-
wrote on 4 Nov 2011, 23:18 last edited by
Hi,
I've cross-compiled Qt 4.7.3 to an ARM board (mini2440). And when I try to load html page with inline SVG graphics, using simple QWebView project, all I get is blank screen. Rendering SVG images directly works correctly so SVG support isn't the problem.Is this a limitation of embedded QtWebKit or have I configured my environment wrongly?
My embed Qt configuration: %./configure -embedded arm -xplatform qws/linux-arm-g++ -prefix /usr/local/arm/Qt -qt-mouse-tslib -little-endian -nomake examples -nomake demos%
-
wrote on 16 Nov 2011, 07:42 last edited by
I had a similar issue which was present even in the stock "previewer" example. The issue seems to be related to the implicit
text/html
MIME type used by QWebView'ssetHtml
function. Comments on "Bug 31115":https://bugs.webkit.org/show_bug.cgi?id=31115#c0 suggest deprecatingsetHtml
because of this potential confusion.The workaround, as suggested in this "bug report":http://doc.qt.nokia.com/stable/examples-webkit.html, use
setContent
instead.bq. @webView->setContent(html.toLocal8Bit(), "application/xhtml+xml");@
Works great. With the obvious catch that the document must be formatted in XHTML.