I am trying to create an animated systray icon for a pyqt4 app but am having trouble finding any examples in python. This is the closest I can find but it's in C++ and I don't know how to translate it over: Is there a way to have (animated)GIF image as system tray icon with pyqt?
How can I go about doing this either with an animated GIF or by using a series of still images as frames?
Maybe something like this. Create
QMovie
instance to be used byAnimatedSystemTrayIcon
. Connect to theframeChanged
signal of the movie and callsetIcon
on theQSystemTrayIcon
. You need to convert the pixmap returned byQMovie.currentPixmap
to aQIcon
to pass tosetIcon
.Disclaimer, only tested on Linux.