[PyQt] QGraphicsPixmapItem not showing set pixmap

dizou di_zou at yahoo.com
Tue Jan 19 17:23:19 GMT 2010


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-tp27229352p27229352.html
Sent from the PyQt mailing list archive at Nabble.com.



More information about the PyQt mailing list