How to set Task Bar icon depending on state of Qt app?
-
Hi,
I would like to change the taskbar icon depending on the app state. (or just the colour of the icon).
In my main window i do
setWindowIcon(ico);
I have found, that changing the window icon like above helps, but not when the program is installed in the Program Files.
When I use InnoSetup to install the app in Program Files, the icon does not change.
When I copy the .exe file to the Program Files location later or when I install in a different location (on a different drive), then Windows asks for some permission, and it works correctly. The app changes the icon.
Does any one know how to change the permissions for the app, so that it would change the icon?
Or maybe something else is blocking the icon change?When it comes to InnoSetup, I copy the files using the option
Permissions: everyone-full
like this:Source: "path\to\file.exe"; DestDir: "{app}"; Flags: ignoreversion ; Permissions: everyone-full
I'm using Qt 5.7.1 with MSVC2015_64bit on Windows 10.
I have found this topics, but if copying the files work, than I do not think the users there are correct:
https://forum.qt.io/topic/11111/how-to-change-taskbar-icon-during-runtime-on-windows/6
https://forum.qt.io/topic/45324/taskbar-icon-different-from-the-icon-of-the-window
http://stackoverflow.com/questions/29284643/how-to-set-an-icon-on-a-main-window-and-action-with-qt