当前位置: 首页>>代码示例>>Python>>正文


Python QAction.setToolTip方法代码示例

本文整理汇总了Python中PySide.QtGui.QAction.setToolTip方法的典型用法代码示例。如果您正苦于以下问题:Python QAction.setToolTip方法的具体用法?Python QAction.setToolTip怎么用?Python QAction.setToolTip使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PySide.QtGui.QAction的用法示例。


在下文中一共展示了QAction.setToolTip方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _createAction

# 需要导入模块: from PySide.QtGui import QAction [as 别名]
# 或者: from PySide.QtGui.QAction import setToolTip [as 别名]
 def _createAction(self, text, slot=None, shortcut=None, icon=None, tip=None, checkable=False, signal="triggered"):
     action = QAction(text, self)
     if icon is not None:
         action.setIcon(QIcon(":/{0}.png".format(icon)))
     if shortcut is not None:
         action.setShortcut(shortcut)
     if tip is not None:
         action.setToolTip(tip)
         action.setStatusTip(tip)
     if slot is not None:
         getattr(action, signal).connect(slot)
     if checkable:
         action.setCheckable(True)
     return action
开发者ID:r3,项目名称:r3tagger,代码行数:16,代码来源:gui.py

示例2: createactions

# 需要导入模块: from PySide.QtGui import QAction [as 别名]
# 或者: from PySide.QtGui.QAction import setToolTip [as 别名]
	def createactions(self, text, slot=None, shortcut="None", icon=None, tip=None, checkable=False,
	                  signal="triggered()"):
		action = QAction(text, self)
		if icon is not None:
			action.setIcon(QIcon(icon))
		if shortcut is not None:
			action.setShortcut(shortcut)
		if tip is not None:
			action.setToolTip(tip)
			action.setStatusTip(tip)
		if slot is not None:
			self.connect(action, SIGNAL(signal), slot)
		if checkable:
			action.setCheckable(True)
		return action
开发者ID:jnoortheen,项目名称:nigandu,代码行数:17,代码来源:mainwin.py

示例3: __init__

# 需要导入模块: from PySide.QtGui import QAction [as 别名]
# 或者: from PySide.QtGui.QAction import setToolTip [as 别名]
 def __init__(self,items,parent):
     self.__name="MoviesMenu"
     #self.vparent=parent
     super(MoviesMenu,self).__init__(parent)
     self.items=items
     self.drives=get_drives_details()
     self.send_to=self.drive_menu()
     delete=QAction(QIcon(appicon("delete")),"Delete",self )
     delete.setToolTip("Delete from database")
     delete.triggered.connect(self.click_event)
     #self.addAction(play)
     #self.addAction(delete)
     #self.addAction(edit)
     #self.addAction(update_imdbid)
     self.addSeparator()
     self.addAction(delete)
     self.addSeparator()
     #self.addAction(properties)
     self.addMenu(self.send_to)
开发者ID:mkawserm,项目名称:iMovMan,代码行数:21,代码来源:moviesmenu.py

示例4: QAction

# 需要导入模块: from PySide.QtGui import QAction [as 别名]
# 或者: from PySide.QtGui.QAction import setToolTip [as 别名]
# custom_soft_effect.py - Example of registering a custom Soft Effect 
from hiero.ui import registerAction
from PySide.QtGui import QAction, QIcon

# This creates an action with an icon and effect named 'Awesome OCIO'
action = QAction(QIcon("icons:TCStop.png"), "Slug", None)

# Soft effect actions can be found by prefixing the QAction's objectName with: 'foundry.timeline.effect'
action.setObjectName("foundry.timeline.effect.addSlug")

# You can optionally set a tooltip for this action
action.setToolTip("Will apply a Slug Gizmo")

# Setting of Data here will point to the Nuke node class name.
# Here, we assume there is a plugin with a Class name 'AwesomeOCIO'
# Note: for soft effects to work, the Nuke node must use a gpuEngine implementation.
action.setData("Slug")

# This registers your custom action with the Effects Menu
registerAction(action)

# This creates an action with an icon and effect named 'SuperGrade'
action = QAction(QIcon("icons:LUT.png"), "SuperGrade", None)

# Soft effect actions can be found by prefixing the QAction's objectName with: 'foundry.timeline.effect.'
action.setObjectName("foundry.timeline.effect.addCustomGrade")

# You can optionally set a tooltip for this action
action.setToolTip("Will apply a Custom Grade soft effect")

action.setData("SuperGrade")
开发者ID:weijer,项目名称:dotHiero,代码行数:33,代码来源:custom_soft_effect.py

示例5: _makeMenu

# 需要导入模块: from PySide.QtGui import QAction [as 别名]
# 或者: from PySide.QtGui.QAction import setToolTip [as 别名]
    def _makeMenu(self):
        '''Makes the menu bar for this widget'''
        # Get the menu bar object
        self.menu = self.menuBar()
        self.fileMenu = self.menu.addMenu('&File')

        # Open action
        open = QAction('&Open', self)
        open.setShortcuts(QKeySequence.Open)
        open.triggered.connect(self.openFromInput)
        open.setToolTip('Open an already made input file')
        self.fileMenu.addAction(open)

        # Save action
        save = QAction('&Save', self)
        save.setShortcuts(QKeySequence.Save)
        save.triggered.connect(self.saveToInput)
        save.setToolTip('Save settings to an input file')
        self.fileMenu.addAction(save)

        # Save action
        saveas = QAction('Save As', self)
        saveas.triggered.connect(self.saveToInputAs)
        save.setToolTip('Save settings to an input file of a new name')
        self.fileMenu.addAction(saveas)

        # Save action
        savepdf = QAction('Save as PDF', self)
        savepdf.triggered.connect(self.saveAsPDF)
        save.setToolTip('Save image to a PDF')
        self.fileMenu.addAction(savepdf)

        # Menu separator
        self.fileMenu.addSeparator()

        # Import action
        imp = QAction('&Import raw XY data', self)
        imp.setShortcut(QKeySequence('Ctrl+I'))
        imp.triggered.connect(self.importRawData)
        imp.setToolTip('Import raw data an plot alongside calculated data')
        self.fileMenu.addAction(imp)

        # Export action
        raw = QAction('Export raw XY data', self)
        raw.triggered.connect(self.exportRawData)
        raw.setToolTip('Export raw data to a file for use elsewhere')
        self.fileMenu.addAction(raw)

        # Export action
        exp = QAction('&Export calculated XY data', self)
        exp.setShortcut(QKeySequence('Ctrl+E'))
        exp.triggered.connect(self.exportXYData)
        exp.setToolTip('Export calculated data to a file for use elsewhere')
        self.fileMenu.addAction(exp)

        # Make script action
        scr = QAction('Make Sc&ript', self)
        scr.setShortcut(QKeySequence('Ctrl+R'))
        scr.triggered.connect(self.makeScript)
        scr.setToolTip('Create a python script that directly recreates this '
                       'spectrum')
        self.fileMenu.addAction(scr)

        # Menu separator
        self.fileMenu.addSeparator()

        # Quit action
        quit = QAction('&Quit', self)
        quit.setShortcuts(QKeySequence.Quit)
        quit.triggered.connect(QApplication.instance().quit)
        self.fileMenu.addAction(quit)
开发者ID:jensengrouppsu,项目名称:rapid,代码行数:73,代码来源:mainwindow.py


注:本文中的PySide.QtGui.QAction.setToolTip方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。