Very simple. Just update/redraw tray icon periodically. With QTimer for example...