Hi

I am transfering some code from PyQt to PySide.

I have problems with QSvgWidget, it does not seem to load content from a byte array, instead it seems to try to open the byte array as a file.

This code snippet:

    def LoadSVG(self, fn):
        ba = QtCore.QByteArray(open(fn).read())
        self.svgwidget.load(ba)

does print the following message:

Cannot open file '<?xml version="1.0" standalone="no"?>
// the whole SVG source here...
', because: The filename, directory name, or volume label syntax is incorrect.

whereas:

    def LoadSVG(self, fn):
        self.svgwidget.load(fn)

works correctly.

Is this a bug in the PySide code?

Thanks

Martin

PS: I normally don't have SVG files in this code, but generate SVG code I want to visualize using the QSvgWidget. The above code is just an example to illustrate the problem I've encountered.
_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside

Reply via email to