Let's say you create a QLabel and make it an icon, by associating an image file 
to it,..
like..

      thisPixmap  = QtGui.QPixmap('server:/images/airplane.jpg') )

      thisIcon = QtGui.QLabel(self)
      thisIcon.setPixmap(thisPixmap)

Now let's say that later, in another function...you need to query "thisIcon"
to obtain the name of the image file associated with it ("airplane.png").
How can one do this?  I can't find any function in either the QLabel nor
the QPixmap class that has a way to return the underlying image filename.

QLabel does have "pixmap()"...as in:

      thisIcon.pixmap()

but that doesn't return the image filename,...it returns the pixmap's address.

Using QIcon might be an option,...but I need to use QLabel as it has "move"
functions,...and QIcon doesn't appear to have that...

Any info or suggestions are greatly appreciated,
Cheers,
-Jim



_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to