[PyQt] QGraphicsPixmapItem not showing set pixmap
dizou
di_zou at yahoo.com
Mon Mar 22 14:34:05 GMT 2010
I still haven't gotten this to work. Any other suggestions?
I've tried this:
class DisplayItem(QGraphicsPixmapItem):
def __init__(self, parent, pixmap=None, graphView=None):
QGraphicsPixmapItem.__init__(self, QPixmap(':/humvee.png'))
and after I do QGraphicsScene.addItem(DisplayItem), nothing shows up.
dizou wrote:
>
> I have:
>
> class DisplayItem(QGraphicsPixmapItem):
> def __init__(self, parent, graphView=None):
> QGraphicsPixmapItem.__init__(self)
>
> pic = QPixmap("/.../.../pic1.png")
> self.setPixmap(pic)
>
> and then when I do QGraphicsScene.addItem(DisplayItem), nothing shows up.
> I can use the paint() function to draw my DisplayItem as my different
> shapes and stuff, so I have my QGraphicsScene and QGraphicsView setup
> correctly.
>
--
View this message in context: http://old.nabble.com/QGraphicsPixmapItem-not-showing-set-pixmap-tp27229352p27987183.html
Sent from the PyQt mailing list archive at Nabble.com.
More information about the PyQt
mailing list