[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyQt] QSVGWidget load method, python3
From: Matt Smith <melkor () orangepalantir ! org>
Date: 2009-03-29 16:10:11
Message-ID: 1238343011.6542.10.camel () MinasTirith
[Download RAW message or body]
Okay I was playing around with python 3 and I found that the SVGWidget
gives me a 'file not found error' when I use either the method
#new data is a QString svg file
serialized_data = newdata.toLocal8Bit()
self.load(serialized_data)
or if I use a connect statement,
self.connect(self,
QtCore.SIGNAL("ready( const QByteArray&)"),self.load)
self.emit(QtCore.SIGNAL("ready( const QByteArray&)"),serialized_data)
It appears that both ways are using the
QSVGWidget.load(self,QString filename)
method instead of the
QSvgWidget.load(self,QByteArray contents)
using:
Qt 4.5.0
PyQt, Sip snapshots 20090324
python3.1a1
On a side note, maybe this is just the documentation not being up todate
with python version three, QByteArray.fromRawData(str) was only working
if I used a byte array, ie QByteArray.fromRawData(str.encode(my_string))
thanks
mbs
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic