The PNG does exist. I did DisplayItem.ensureVisible(10, 10, 10, 10) and DisplayItem.ensureVisible() and neither function did anything. There were no errors though.
Jason H-3 wrote: > > Simply, your PNG does not exist. Try print > QFile.exists('/.../.../pic1.png") > Or > You aren't looking at it. Try using ensureVisible() on it in case its > off-screen. > > > > > ----- Original Message ---- > From: dizou <di_...@yahoo.com> > To: pyqt@riverbankcomputing.com > Sent: Tue, January 19, 2010 12:23:19 PM > Subject: [PyQt] QGraphicsPixmapItem not showing set pixmap > > > 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. > > _______________________________________________ > PyQt mailing list PyQt@riverbankcomputing.com > http://www.riverbankcomputing.com/mailman/listinfo/pyqt > > > > > > _______________________________________________ > PyQt mailing list PyQt@riverbankcomputing.com > http://www.riverbankcomputing.com/mailman/listinfo/pyqt > > -- View this message in context: http://old.nabble.com/QGraphicsPixmapItem-not-showing-set-pixmap-tp27229352p27248863.html Sent from the PyQt mailing list archive at Nabble.com. _______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt