[PyQt] How can i capture activated signal of Tray Icon??

Jebagnana Das jebagnanadas at gmail.com
Mon Nov 8 14:54:55 GMT 2010


Hello all,

        Based on this example
http://www.saltycrane.com/blog/2008/01/how-to-capture-tab-key-press-event-with/i've
created a class as below

class SystemTrayIcon(QtGui.QSystemTrayIcon):

    def __init__(self,parent,objectName):

        QtGui.QSystemTrayIcon.__init__(self,parent)

        self.setObjectName(objectName)

        print("Tray icon created")

    def activated(self,reason):

        if reason==QtGui.QSystemTrayIcon.DoubleClick:

            print("Tray icon Double clicked")

After creating an object for this class when i double click the tray icon
nothing happens. Any idea of what am i missing here?? Thanks..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20101108/37dba896/attachment.html>


More information about the PyQt mailing list