Cannot Show SVG with QWebEngineView

Tong Zhang <[email protected]>
Newsgroups gmane.comp.python.pyqt-pykde
Message-ID <CABUYRu52YCVTTnorze9BZKN+hDw0fUyibmHHL1iJ1uOq8jBCUA@mail.gmail.com>
Hello,

I'm trying to use QWebEngineView to display a SVG image, but just got the
empty, below is the code:
filename: show_svg.py

from PyQt5.QtWidgets import QApplication
         from PyQt5.QtCore import QUrl
                  from PyQt5.QtWebEngineWidgets import QWebEngineView

         import sys


app = QApplication(sys.argv)
svg = QUrl(sys.argv[1])
view = QWebEngineView()
view.load(svg)
view.show()

sys.exit(app.exec_())


Please find attached SVG file, the testing command is 'python3 show_svg.py
test1.svg'. Thanks for your help.

Tong

_______________________________________________
PyQt mailing list    [email protected]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
test1.svg (image/svg+xml, 2.6 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.