[PyQt] PyQt, QWebView, SVG Rendering Problem
Atul Kulkarni
aak.kulkarni at gmail.com
Thu Jan 29 08:38:50 GMT 2009
David Boddie wrote:
>
> On Fri Jan 23 12:47:29 GMT 2009, Atul Kulkarni wrote:
>
>> I have a problem of rendering SVG Images in QWebView. The SVG Images are
>> replaced with missing image icons ("?"). I am inserting a simple SVG
>> image
>> in an XHTML document.
>
> This is a common problem with most Web browsers because SVG support is not
> as widespread as it would ideally be. Does the page appear as it should do
> in other browsers?
>
>> Can any one help me resolve this problem. I would really appreciate any
>> help or direction.
>>
>> My System and File details as follows:
>> OS - Windows XP
>> Python 2.5
>> PyQt4.4.3 with Qt4
>> Using Qt Designer 4.4.1 Open Source Edition
>> My PyQt4 plugins has imageformats with qsvg4.dll, qsvgd4.dll
>
> I don't think that Qt's support for SVG will make any difference here
> because WebKit is doing the rendering. I don't know what features WebKit
> has for embedding SVG 1.1 drawings into pages, but it seems to be able to
> display them (Qt 4.4.3, PyQt 4.4.4, Linux) if you pass the URL to the
> SVG itself to QWebView's load() method.
>
> In fact, it seems that they can also be embedded into the page. The
> following
> simplified XHTML markup worked for me:
>
> <!DOCTYPE html PUBLIC
> "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:svg="http://www.w3.org/2000/svg"
> xmlns:xlink="http://www.w3.org/1999/xlink" lang="en">
> <head>
> <meta http-equiv="content-type"
> content="application/xml+xhtml; charset=UTF-8" />
> <title>SVG Test</title>
> </head>
> <body>
> <p>I am Object showing SVG</p>
>
> Your Browser does not support SVG
>
> </body>
> </html>
>
> Initially, I was convinced it wasn't working because I couldn't see the
> picture immediately below the "?" images, but scrolling down to the bottom
> of the page revealed it.
>
> David
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
>
Thanks David, simplified XHTML markup worked for me also, but I am trying to
sortout why svg images are not rendered with <img...> and <image ...>
elements, where as it gets rendered in Safari and Opera web Browsers. Yes,
you are right, if we embed svg into page QWebView renders it.
Thanks again
Atul K.
--
View this message in context: http://www.nabble.com/PyQt%2C-QWebView%2C-SVG-Rendering-Problem-tp21623851p21722812.html
Sent from the PyQt mailing list archive at Nabble.com.
More information about the PyQt
mailing list