Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Resolved] QT/Mac Icon problem
Forum Updated to NodeBB v4.3 + New Features

[Resolved] QT/Mac Icon problem

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 3.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    ronM71
    wrote on 20 Feb 2012, 17:47 last edited by
    #1

    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"?

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on 20 Feb 2012, 18:47 last edited by
      #2

      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 ?

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • R Offline
        R Offline
        ronM71
        wrote on 20 Feb 2012, 18:52 last edited by
        #3

        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.

        1 Reply Last reply
        0
        • R Offline
          R Offline
          ronM71
          wrote on 23 Feb 2012, 15:44 last edited by
          #4

          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 Reply Last reply
          0

          1/4

          20 Feb 2012, 17:47

          • Login

          • Login or register to search.
          1 out of 4
          • First post
            1/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved