For future google visitors: you may read comments under the question, because this is where this answer was born.
So the problem is that ico
format is not supported by QIcon
by default and you need a plugin for this. In such cases QImageReader::supportedImageFormats()
function, which lists formats supported by QIcon may be helpful.
In case your format is not supported, you may try to copy imageformats
folder from Qt's plugins
directory into directory where your executable resides. If your app lies in c:\myapp
folder you should have c:\myapp\imageformats
folder (not c:\myapp\plugins\imageformats
). Otherwise you have to set paths using QCoreApplication::addLibraryPath
.
Also make sure that qico4.dll
and qicod4.dll
(if you build in debug mode) are there.