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


Python QGroupBox.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from PySide.QtGui import QGroupBox [as 别名]
# 或者: from PySide.QtGui.QGroupBox import __init__ [as 别名]
 def __init__(self, group_name, name_list, param_type = int, default_param = None, help_instance = None, handler = None, help_dict = None):
     QGroupBox.__init__(self, group_name)
     the_layout = QVBoxLayout()
     the_layout.setSpacing(5)
     the_layout.setContentsMargins(1, 1, 1, 1)
     self.setLayout(the_layout)
     self.widget_dict = OrderedDict([])
     self.mytype= param_type
     self.is_popup = False
     if default_param == None:
         default_param = ""
     self.default_param = default_param
     for txt in name_list:
         qh = QHBoxLayout()
         cb = QCheckBox(txt)
         cb.setFont(QFont('SansSerif', 12))
         efield = QLineEdit(str(default_param))
         efield.setFont(QFont('SansSerif', 10))
         efield.setMaximumWidth(25)
         qh.addWidget(cb)
         qh.addStretch()
         qh.addWidget(efield)
         the_layout.addLayout(qh)
         if handler != None:
             cb.toggled.connect(handler)
         self.widget_dict[txt] = [cb, efield]
         if (help_dict != None) and (help_instance != None):
             if txt in help_dict:
                 help_button_widget = help_instance.create_button(txt, help_dict[txt])
                 qh.addWidget(help_button_widget)
     return
开发者ID:bsherin,项目名称:shared_tools,代码行数:33,代码来源:mywidgets.py

示例2: __init__

# 需要导入模块: from PySide.QtGui import QGroupBox [as 别名]
# 或者: from PySide.QtGui.QGroupBox import __init__ [as 别名]
    def __init__( self, accordion, title, widget ):
        QGroupBox.__init__(self, accordion)

        # create the layout
        layout = QVBoxLayout()
        layout.setContentsMargins(6, 6, 6, 6)
        layout.setSpacing(0)
        layout.addWidget(widget)

        self._accordianWidget = accordion
        self._rolloutStyle = 2
        self._dragDropMode = 0

        self.setAcceptDrops(True)
        self.setLayout(layout)
        self.setContextMenuPolicy(Qt.CustomContextMenu)
        self.customContextMenuRequested.connect(self.showMenu)

        # create custom properties
        self._widget = widget
        self._collapsed = False
        self._collapsible = True
        self._clicked = False
        self._customData = {}

        # set common properties
        self.setTitle(title)
开发者ID:Sugz,项目名称:Python,代码行数:29,代码来源:accd.py

示例3: __init__

# 需要导入模块: from PySide.QtGui import QGroupBox [as 别名]
# 或者: from PySide.QtGui.QGroupBox import __init__ [as 别名]
 def __init__(self, title, labels):
     QGroupBox.__init__(self, title)
     self.layout = QBoxLayout(QBoxLayout.LeftToRight)
     self.buttons = {}
     for label in labels:
         button = QRadioButton(label)
         self.buttons[label] = button
         self.layout.addWidget(button)
     self.setLayout(self.layout)
开发者ID:LS80,项目名称:FFL,代码行数:11,代码来源:ui_editTeam.py


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