[PyQt] PyQt, QWebView, SVG Rendering Problem

David Boddie david at boddie.org.uk
Sat Jan 24 16:05:34 GMT 2009


On Sat Jan 24 04:59:26 GMT 2009, Christoph Burgmer wrote:

> It doesn't work for me with PyQt 4.4.2. I'm using setHtml() not load().
> I can currently not update to a newer version, so I cannot verify if that
> is a issue in 4.4.2 solved in 4.4.3.

It seems to work for me. This is what I tried:

from PyQt4.QtGui import *
from PyQt4.QtWebKit import *
from PyQt4.QtCore import QUrl
u = QUrl("file:///tmp/SVG_test/svg_test.xhtml")
app = QApplication([])
w = QWebView()
w.setHtml(open("/tmp/SVG_test/svg_test.xhtml").read(), u)
w.show()

David


More information about the PyQt mailing list