PDA

View Full Version : Getting image file from QPixmap



di_zou
5th October 2009, 16:09
I am creating a new QPixmap with the file name as the parameter for the constructor:

QPixmap(":/.../.../name.png")
I looked at the documentation, and I couldn't find a function to get the file name as a QString. How do I do this?

scascio
5th October 2009, 16:18
Neither do I.

I think you can't, since you can create and play with a QPixmap without file.
I am afraid that you have to manage it yourself in an associative container, like a map.

Lykurg
5th October 2009, 16:20
QPixmap doesn't store the file name of the picture that you set. You have to store it by yourself.