In a simple Qt application starting like this:
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
app.setWindowIcon(QIcon(":/qapp/appicon.ico"));
...
we set the icon in the second line (this line and icon file in resources is the only difference between my test program and application generated by Qt wizard). This application works perfect on Windows XP, but on Windows 7 we can't see our icon in top-left corner of the window (system shows default icon instead of my appicon.ico).
Configuration of developer's computer:
UPDATE:
Operating system of developer is Windows XP, so we have temporary answer. When we compiled this application on computer with Windows 7, the problem disappeared (application shows the icon correctly on WinXP and Win7). So now we have to compile releases of this application on Windows 7. But it does not looks like perfect solution.
Do you have any ideas, how to solve this problem better?
Similar question is .ico icons not showing up on Windows. Solution is simple:
imageformats
in application dir,qico.dll
in it.Without this plugin QIcon can't read .ico files. So the problem was not in Windows 7 and Windows XP. The problem was in default paths variables on different computers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With