[PyQt] QGraphicsPixmapItem not showing set pixmap

dizou di_zou at yahoo.com
Mon Mar 22 14:12:10 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:
> 
> So I've got a Icons.qrc file; I've got the IconsCompiled.py file. I'm
> doing import IconsCompiled. 
> print QFile.exists('/.../.../images/humvee.png') returns "True"
> print QFile.exists(':/images/humvee.png') returns "True"
> I am still not getting a pixmap displayed on the screen.
> 
> 

-- 
View this message in context: http://old.nabble.com/QGraphicsPixmapItem-not-showing-set-pixmap-tp27229352p27986886.html
Sent from the PyQt mailing list archive at Nabble.com.



More information about the PyQt mailing list