Most of Qt's support for file formats relies on plugins. To ensure that your application works as expected when deploying it on non-development machines, you will have to make sure that you have also deployed the relevant plugins. If you haven't, the loading of files (ICO icons in this case) will simply fail silently.
The plugin of importance in this case is qico4.dll (if you're on Windows).
The official Qt documentation contains all the relevant information on Qt deployment for both Windows and Mac. Scroll down to the relevant information on Qt plugins.
As a quick solution you could create a directory named imageformats
as a subdirectory of the folder containing your executable, into which you copy the qico4.dll.
(Note: user @smerlin says this has to be plugins/imageformats
relative to your executable directory. I seem to recall that my applications did not require the extra plugins
directory, but I'll update my answer should I find that this is indeed the case).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…