[PyQt] rendering svg
niels.egberts at gmail.com
Wed Apr 16 20:43:51 BST 2008
Hi, I am pretty new to qt4 and python (have have very limited experience
with C++ and qt3).
I have a QWidget that I am using as a gameboard. So I want to draw svg
images on it (like chesspieces and such). I have got this now:
def __init__(self, parent=None):
> QtGui.QWidget.__init__(self, parent)
> self.setGeometry(300, 300, 250, 150)
> self.setWindowTitle('Draw Text')
> self.picture = QtGui.QPicture()
> def paintEvent(self, event):
> paint = QtGui.QPainter()
I understand that I need to place my image in a buffer and then do
drawImage(0,0,self.buffer) but I can't find out how to do that. Can someone
give me a code snippit on how I can achieve to render his svg?
Thank you very much,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt