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. How to set Task Bar icon depending on state of Qt app?
Forum Updated to NodeBB v4.3 + New Features

How to set Task Bar icon depending on state of Qt app?

Scheduled Pinned Locked Moved Unsolved General and Desktop
windows 10innosetupmsvc2015icon
1 Posts 1 Posters 1.1k 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.
  • michalosM Offline
    michalosM Offline
    michalos
    wrote on last edited by michalos
    #1

    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

    1 Reply Last reply
    0

    • Login

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