PDA

View Full Version : How to get the QIcon fileneme in use.



gt.beta2
25th February 2009, 10:55
Hello

I have buttons that i want to change the icon image file depending on some situations.
I use:

ui->objectname->setPixmap(QPixmap(":/prefix/alias"));
Is the a way to read the resource name into a QString (for instance)?

Thanks

jpn
25th February 2009, 15:30
No. Once an image has been loaded, there is no reference to any file at all. Loading images from files is provided for convenience. Images can be loaded directly from an array of bytes too, without files involved.