[PyQt] QGraphicsPixmapItem not showing set pixmap

Nick Gaens mail at nickgaens.com
Fri Jan 29 08:25:29 GMT 2010


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 = QPixmap('/../../pic1.png')

As you can see, only two dots here, which would make more sense to me
(that's why I suggested "../../pic1.png", since this is a more common
construction).
Can you elaborate why there are three dots in your path to the image?

Secondly, did you take a look at the documents to use a resources-file?

Nick

On Thu, Jan 28, 2010 at 9:14 PM, dizou <di_zou at yahoo.com> wrote:

>
> 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') ?
> >>
> >> I'm guessing you are trying to do:
> >>
> >> pic = QPixmap('../../pic1.png') <- note the change in the path to the
> >> image file.
> >>
> >>
> >> Nick
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/QGraphicsPixmapItem-not-showing-set-pixmap-tp27229352p27358788.html
> Sent from the PyQt mailing list archive at Nabble.com.
>
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>



-- 
Nick Gaens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100129/6ab70133/attachment.html>


More information about the PyQt mailing list