I have created static(PNG) image as tray icon with pyqt.
Did the same with GIF image results in static tray icon. Can it animated in system tray with pyqt?
QtGui.QSystemTrayIcon.__init__(self, parent)
self.setIcon(QtGui.QIcon("Image.gif"))
I have created static(PNG) image as tray icon with pyqt.
Did the same with GIF image results in static tray icon. Can it animated in system tray with pyqt?
QtGui.QSystemTrayIcon.__init__(self, parent)
self.setIcon(QtGui.QIcon("Image.gif"))
Use QMovie
to play the animated gif, and update the tray icon on each new frame event:
m_icon = new QSystemTrayIcon();
m_icon->show();
m_gif = new QMovie(":/animated.gif");
connect(m_gif, SIGNAL(frameChanged(int)), this, SLOT(updateIcon()));
m_gif->start();
...
void MyWidget::updateIcon()
{
m_icon->setIcon(m_gif->currentPixmap());
}
Sorry for the C++ example, I don't have PyQt installed.