I figured it out...this does the trick:
class Image(QCanvasRectangle):
def __init__(self,canvas):
QCanvasRectangle.__init__(self,20,20,32,32,canvas)
self.pixmap = QPixmap('router.bmp')
def drawShape(self,painter):
painter.drawPixmap( 20, 20, self.pixmap );
...
item = Image(canvas)
item.show()
...
-----Original Message-----
From: Holmquist, Neil [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 08, 2001 9:15 AM
To: [EMAIL PROTECTED]
Subject: [PyKDE] How to add a bmp,gif,png or jpg onto a canvas
I'm having the darndest time trying to add a graphic image onto a canvas.
Does anyone have an example or can explain how to do this.
Thanks.
_______________________________________________
PyKDE mailing list [EMAIL PROTECTED]
http://mats.gmd.de/mailman/listinfo/pykde
_______________________________________________
PyKDE mailing list [EMAIL PROTECTED]
http://mats.gmd.de/mailman/listinfo/pykde