View Full Version : Getting image file from QPixmap

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

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?

5th October 2009, 17: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.

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