Important: Please read the Qt Code of Conduct -

Inline SVG support in QtWebKit embedded

  • 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%

  • 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's setHtml function. Comments on "Bug 31115": suggest deprecating setHtml because of this potential confusion.

    The workaround, as suggested in this "bug report":, 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.

Log in to reply