How to Update Your Qt Application’s Taskbar Icon at Runtime

Posted on Posted in Qt Tutorials, Tutorials

To update a Qt app’s taskbar icon you need to create a QIcon object and assign it using setWindowIcon of the QApplication. Here is very simple example:


Notice that you are not required to provide an icon file (*.ico , *.icns etc.) for this function to work and you can use any (standard) image file type such as *.jpg or *.png etc. This function can be called anywhere in the program. You can use this same method along with a QTimer to ANIMATE TASKBAR ICON.

Leave a Reply

Your email address will not be published. Required fields are marked *