def _action(self, name, callback=None, icon_path=None):
""" Create an action and store it in self.actions.
"""
action = QtGui.QAction(self)
action.setText(name)
if icon_path:
action.setIcon(icon_path)
if callback:
action.connect(action, QtCore.SIGNAL("triggered()"), callback)
return action
评论列表
文章目录