[Resolved] QT/Mac Icon problem
-
wrote on 20 Feb 2012, 17:47 last edited by
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"?
-
wrote on 20 Feb 2012, 18:47 last edited by
Did you see the "special section for MAC":http://developer.qt.nokia.com/doc/qt-4.8/appicon.html#setting-the-application-icon-on-mac-os-x ?
-
wrote on 20 Feb 2012, 18:52 last edited by
I did, but it doesn't answer my question of how to I change dock icons, or project information on a dock icon (similar to a new e-mail count on some mail applications) at runtime, and without defining an application icon, so that no icon is drawn on any of my window captions.
-
wrote on 23 Feb 2012, 15:44 last edited by
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, all my window captions remain with text only and no icon is shown.
1/4