I’d like to change my dock Icon during runtime. As I understand the only way to do that is to call something like on the QApplication:
setWindowIcon(QIcon("my resource or file")); // which I set to a 512x512 png resource I have
It works, but as a side effect, allt the windows in my application are now shown with an icon on the caption — something I do not want. I just want the caption text on a given window.
Is there a way to suppress the projection of the application icon on the window caption and still change the dock icon dynamically at runtime?
Bypassing this would also work as the reason for the change of the dock icon is to add a “badge” onto it and remove that badge under certain conditions. Can such badge be drawn without having to call “SetWindowIcon”?
I found no other way, so eventually, what I ended up doing is actively forcing a blank QIcon() onto all my windows (on Mac Only of course). That makes sure that even after the dock icon is changed at runtime, all my window captions remain with text only and no icon is shown.