本文整理汇总了Python中PyQt4.Qt.QToolButton.show方法的典型用法代码示例。如果您正苦于以下问题:Python QToolButton.show方法的具体用法?Python QToolButton.show怎么用?Python QToolButton.show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.Qt.QToolButton
的用法示例。
在下文中一共展示了QToolButton.show方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: PM_Dialog
# 需要导入模块: from PyQt4.Qt import QToolButton [as 别名]
# 或者: from PyQt4.Qt.QToolButton import show [as 别名]
class PM_Dialog( QDialog, SponsorableMixin ):
"""
The PM_Dialog class is the base class for Property Manager dialogs.
[To make a PM class from this superclass, subclass it to customize
the widget set and add behavior.
You must also provide certain methods that used to be provided by
GeneratorBaseClass, including ok_btn_clicked and several others,
including at least some defined by SponsorableMixin (open_sponsor_homepage,
setSponsor).
This set of requirements may be cleaned up.]
"""
headerTitleText = "" # The header title text.
_widgetList = [] # A list of all group boxes in this PM dialog,
# including the message group box
# (but not header, sponsor button, etc.)
_groupBoxCount = 0 # Number of PM_GroupBoxes in this PM dialog
_lastGroupBox = None # The last PM_GroupBox in this PM dialog
# (i.e. the most recent PM_GroupBox added)
def __init__(self,
name,
iconPath = "",
title = ""
):
"""
Property Manager constructor.
@param name: the name to assign the property manager dialog object.
@type name: str
@param iconPath: the relative path for the icon (PNG image) that
appears in the header.
@type iconPath: str
@param title: the title that appears in the header.
@type title: str
"""
QDialog.__init__(self)
self.setObjectName(name)
self._widgetList = []
# Main pallete for PropMgr.
self.setPalette(QPalette(pmColor))
# Main vertical layout for PropMgr.
self.vBoxLayout = QVBoxLayout(self)
self.vBoxLayout.setMargin(PM_MAINVBOXLAYOUT_MARGIN)
self.vBoxLayout.setSpacing(PM_MAINVBOXLAYOUT_SPACING)
# Add PropMgr's header, sponsor button, top row buttons and (hidden)
# message group box.
self._createHeader(iconPath, title)
self._createSponsorButton()
self._createTopRowBtns() # Create top buttons row
self.MessageGroupBox = PM_MessageGroupBox(self)
# Keep the line below around; it might be useful.
# I may want to use it now that I understand it.
# Mark 2007-05-17.
#QMetaObject.connectSlotsByName(self)
self._addGroupBoxes()
try:
self._addWhatsThisText()
except:
print_compact_traceback("Error loading whatsthis text for this "
"property manager: ")
try:
self._addToolTipText()
except:
print_compact_traceback("Error loading tool tip text for this "
"property manager: ")
#The following attr is used for comparison in method
#'_update_UI_wanted_as_something_changed'
self._previous_all_change_indicators = None
def update_UI(self):
"""
Update whatever is shown in this PM based on current state
of the rest of the system, especially the state of self.command
and of the model it shows.
This is part of the PM API required by baseCommand,
since it's called by baseCommand.command_update_UI.
@note: Overridden in Command_PropertyManager, but should not be
#.........这里部分代码省略.........