[PyQt] Dumb question about QAction
Phil Thompson
phil at riverbankcomputing.co.uk
Sat Oct 6 09:55:18 BST 2007
On Saturday 06 October 2007, Nahuel Defossé wrote:
> Hi,
> I'm sure there's a simple answer for this question.
> I have a QSystemTrayIcon which sets its context menu with a custom class I
> wrote with a few actions (exit, start, stop, status).
> I conntect signals with QtCore.QMetaObject.connectSlotsByName(self), after
> I've set up all actions in the menu class' __init__, taking care of giving
> each action a object name (so connectSlotsByName can work).
> The problem is that whenever I push a menu item (a action) the assosiated
> method (ie: on_action_exit_triggered) is executed two times, any
> suggestion. I suspect it's related with trigger, but I can't figure out
> what's going on.
See...
http://www.riverbankcomputing.com/Docs/PyQt4/pyqt4ref.html#the-qtcore-pyqtsignature-decorator
Phil
More information about the PyQt
mailing list