say i have a qaction on which i set an icon.
auto action = new QAction; action->setIcon(QIcon(":/icons/icon"));
i've set an icon this way, it worked. then i replaced the image file with another image file with the same name, but the old image appeared on the action. so i did a clean build but still the old one appears. when i comment out the setIcon line, only the action's text appears on the action which is okay, since it doesn't have an icon. but why would this happen?
show your qrc file pls
it's nothing special, it works for other images, this really weird
<qresource prefix="/icons"> <file alias="icon">some_name.png</file> </qresource>
How did you do your clean re-build ?
To ensure it's 100% clean, delete the build folder completely by hand.