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?
Printable View
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?
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.
QPixmap doesn't store the file name of the picture that you set. You have to store it by yourself.