Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. Inline SVG support in QtWebKit embedded
Forum Updated to NodeBB v4.3 + New Features

Inline SVG support in QtWebKit embedded

Scheduled Pinned Locked Moved Qt WebKit
2 Posts 2 Posters 5.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    ignac32
    wrote on last edited by
    #1

    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%

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      zourtney
      wrote on last edited by
      #2

      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":https://bugs.webkit.org/show_bug.cgi?id=31115#c0 suggest deprecating setHtml 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.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved