[PyQt] QGraphicsPixmapItem not showing set pixmap

2010-01-19 Thread dizou
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 t

Re: [PyQt] QGraphicsPixmapItem not showing set pixmap

2010-01-19 Thread Jason H
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

Re: [PyQt] QGraphicsPixmapItem not showing set pixmap

2010-01-20 Thread dizou
You aren't looking at it. Try using ensureVisible() on it in case its > off-screen. > > > > > - Original Message > From: dizou > To: pyqt@riverbankcomputing.com > Sent: Tue, January 19, 2010 12:23:19 PM > Subject: [PyQt] QGraphicsPixmapItem n

Re: [PyQt] QGraphicsPixmapItem not showing set pixmap

2010-01-21 Thread Nick Gaens
creen. - Original Message From: dizou 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): QGrap

Re: [PyQt] QGraphicsPixmapItem not showing set pixmap

2010-01-21 Thread dizou
print QFile.exists('/.../.../pic1.png') outputs True. I am doing pic = QPixmap('/../../pic1.png') not pic = QPixmap('../../pic1.png') nickgaens wrote: > > Did you try QFile.exists('/.../.../pic1.png') ? > > I'm guessing you are trying to do: > > pic = QPixmap('../../pic1.png') <- note the ch

Re: [PyQt] QGraphicsPixmapItem not showing set pixmap

2010-01-28 Thread dizou
Can someone give me some more help about this? dizou wrote: > > I did print QFile.exists('/.../.../pic1.png'); it outputs "True." > I am doing pic = QPixmap('/../../pic1.png') not > pic = QPixmap('../../pic1.png') > > > nickgaens wrote: >> >> Did you try QFile.exists('/.../.../pic1.png') ? >

Re: [PyQt] QGraphicsPixmapItem not showing set pixmap

2010-01-29 Thread Nick Gaens
It doesn't make that much sense to me. > I did print QFile.exists('/.../.../pic1.png'); it outputs "True." Ok, great, so there is a file there, named "pic1.png". What exactly is the meaning of three dots for a folders name? I am asking this, because you say in the next sentence: > I am doing pic

Re: [PyQt] QGraphicsPixmapItem not showing set pixmap

2010-01-29 Thread dizou
The dots are just me replacing the name of the folders. It's not the .. command. By resources file do you mean a .qrc file? -- View this message in context: http://old.nabble.com/QGraphicsPixmapItem-not-showing-set-pixmap-tp27229352p27372427.html Sent from the PyQt mailing list archive at Nabble

Re: [PyQt] QGraphicsPixmapItem not showing set pixmap

2010-01-29 Thread dizou
I made a Icons.qrc file. I am now doing this: pyrcc4 -py2 Icons.qrc -o IconsCompiled What should the extension IconsCompiled be? How would I import that file to my PyQt program? -- View this message in context: http://old.nabble.com/QGraphicsPixmapItem-not-showing-set-pixmap-tp27229352p2737314

Re: [PyQt] QGraphicsPixmapItem not showing set pixmap

2010-01-30 Thread David Boddie
On Fri, 29 Jan 2010 07:00:13 -0800 (PST), dizou wrote: > I made a Icons.qrc file. I am now doing this: > > pyrcc4 -py2 Icons.qrc -o IconsCompiled > > What should the extension IconsCompiled be? How would I import that file to > my PyQt program? It's a Python module, so call it IconsCompiled.py or

Re: [PyQt] QGraphicsPixmapItem not showing set pixmap

2010-02-01 Thread dizou
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 messag

Re: [PyQt] QGraphicsPixmapItem not showing set pixmap

2010-03-22 Thread dizou
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

Re: [PyQt] QGraphicsPixmapItem not showing set pixmap

2010-03-22 Thread dizou
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

Re: [PyQt] QGraphicsPixmapItem not showing set pixmap

2010-03-23 Thread David Boddie
[Resending from the correct address...] On Mon Mar 22 14:12:10 GMT 2010, dizou wrote: > 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): > QGraphicsPi

Re: [PyQt] QGraphicsPixmapItem not showing set pixmap

2010-03-23 Thread dizou
I figured out the problem. I had overloaded the paint() function, and in my overloaded function, I wasn't calling the superclass's paint() -- View this message in context: http://old.nabble.com/QGraphicsPixmapItem-not-showing-set-pixmap-tp27229352p28005332.html Sent from the PyQt mailing list ar