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


Python QStyledItemDelegate.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from PyQt5.QtWidgets import QStyledItemDelegate [as 别名]
# 或者: from PyQt5.QtWidgets.QStyledItemDelegate import __init__ [as 别名]
    def __init__(self, parent=None):
        if isinstance(parent, QWidget):
            self._font = parent.font()
        else:
            self._font = None

        QStyledItemDelegate.__init__(self, parent)
开发者ID:hlamer,项目名称:enki,代码行数:9,代码来源:htmldelegate.py

示例2: __init__

# 需要导入模块: from PyQt5.QtWidgets import QStyledItemDelegate [as 别名]
# 或者: from PyQt5.QtWidgets.QStyledItemDelegate import __init__ [as 别名]
 def __init__(self, parent=None):
     QStyledItemDelegate.__init__(self, parent)
     self.factor = settings.corkSizeFactor / 100.
     self.defaultSize = QSize(300, 200)
     self.lastPos = None
     self.editing = None
     self.margin = 5
开发者ID:georgehank,项目名称:manuskript,代码行数:9,代码来源:corkDelegate.py

示例3: __init__

# 需要导入模块: from PyQt5.QtWidgets import QStyledItemDelegate [as 别名]
# 或者: from PyQt5.QtWidgets.QStyledItemDelegate import __init__ [as 别名]
    def __init__(self, parent=None):
        QStyledItemDelegate.__init__(self, parent)
        self.factor = settings.corkSizeFactor / 100.
        self.lastPos = None
        self.editing = None
        self.margin = 5

        self.bgColors = {}
开发者ID:olivierkes,项目名称:manuskript,代码行数:10,代码来源:corkDelegate.py

示例4: __init__

# 需要导入模块: from PyQt5.QtWidgets import QStyledItemDelegate [as 别名]
# 或者: from PyQt5.QtWidgets.QStyledItemDelegate import __init__ [as 别名]
    def __init__(self, layersView, listModel, parent=None):
        QStyledItemDelegate.__init__(self, parent=parent)
        self.currentIndex = -1
        self._view = layersView
        self._w = LayerItemWidget()
        self._listModel = listModel
        self._listModel.rowsAboutToBeRemoved.connect(self.handleRemovedRows)

        # We keep a dict of all open editors for easy access.
        # Note that the LayerWidget uses persistent editors.
        # (This is for convenience of testing.)
        # This is also why we don't need to override the paint() method here.
        self._editors = {}
开发者ID:ilastik,项目名称:volumina,代码行数:15,代码来源:layerwidget.py

示例5: __init__

# 需要导入模块: from PyQt5.QtWidgets import QStyledItemDelegate [as 别名]
# 或者: from PyQt5.QtWidgets.QStyledItemDelegate import __init__ [as 别名]
    def __init__(self, parent=None):
        QStyledItemDelegate.__init__(self, parent)
        self.no_index = QModelIndex()
        self.hoverrow = None
        self.hover_index = None
        self.controls = []

        # We have to control if mouse is in the buttons box to add some tolerance for vertical mouse
        # misplacement around the buttons. The button box effectively overlaps upper and lower rows.
        #   row 0
        #             --------- <- tolerance zone
        #   row 1     |buttons|
        #             --------- <- tolerance zone
        #   row 2
        # button_box_extended_border_ration controls the thickness of the tolerance zone
        self.button_box = QRect()
        self.button_box_extended_border_ratio = float(0.3)
开发者ID:Tribler,项目名称:tribler,代码行数:19,代码来源:tablecontentdelegate.py

示例6: __init__

# 需要导入模块: from PyQt5.QtWidgets import QStyledItemDelegate [as 别名]
# 或者: from PyQt5.QtWidgets.QStyledItemDelegate import __init__ [as 别名]
 def __init__(self, *args, **kwargs):
     QStyledItemDelegate.__init__(self, *args, **kwargs)
     self._display_text = True
开发者ID:patrickatamaniuk,项目名称:moneyguru,代码行数:5,代码来源:item_delegate.py

示例7: __init__

# 需要导入模块: from PyQt5.QtWidgets import QStyledItemDelegate [as 别名]
# 或者: from PyQt5.QtWidgets.QStyledItemDelegate import __init__ [as 别名]
 def __init__(self, parent=None):
     QStyledItemDelegate.__init__(self, parent)
开发者ID:TenKeyAngle,项目名称:manuskript,代码行数:4,代码来源:completer.py

示例8: __init__

# 需要导入模块: from PyQt5.QtWidgets import QStyledItemDelegate [as 别名]
# 或者: from PyQt5.QtWidgets.QStyledItemDelegate import __init__ [as 别名]
 def __init__(self, parent, widget):
     QStyledItemDelegate.__init__(self, parent)
     self.widget = widget
开发者ID:FreeOpcUa,项目名称:opcua-modeler,代码行数:5,代码来源:namespace_widget.py

示例9: __init__

# 需要导入模块: from PyQt5.QtWidgets import QStyledItemDelegate [as 别名]
# 或者: from PyQt5.QtWidgets.QStyledItemDelegate import __init__ [as 别名]
 def __init__(self, format="%c", parent=None):
     QStyledItemDelegate.__init__(self, parent)
     self.format = format
开发者ID:marcel-goldschen-ohm,项目名称:ModelViewPyQt,代码行数:5,代码来源:DateTimeEditDelegateQt.py

示例10: __init__

# 需要导入模块: from PyQt5.QtWidgets import QStyledItemDelegate [as 别名]
# 或者: from PyQt5.QtWidgets.QStyledItemDelegate import __init__ [as 别名]
 def __init__(self, parent, model, added_node_list):
     QStyledItemDelegate.__init__(self, parent)
     self.added_node_list = added_node_list
     self.model = model
开发者ID:FreeOpcUa,项目名称:opcua-modeler,代码行数:6,代码来源:uamodeler.py

示例11: __init__

# 需要导入模块: from PyQt5.QtWidgets import QStyledItemDelegate [as 别名]
# 或者: from PyQt5.QtWidgets.QStyledItemDelegate import __init__ [as 别名]
 def __init__(self, text="", parent=None):
     QStyledItemDelegate.__init__(self, parent)
     self.text = text
     self._isMousePressed = False
开发者ID:marcel-goldschen-ohm,项目名称:ModelViewPyQt,代码行数:6,代码来源:PushButtonDelegateQt.py

示例12: __init__

# 需要导入模块: from PyQt5.QtWidgets import QStyledItemDelegate [as 别名]
# 或者: from PyQt5.QtWidgets.QStyledItemDelegate import __init__ [as 别名]
 def __init__(self, rootIndex=None, parent=None):
     QStyledItemDelegate.__init__(self, parent)
     self.rootIndex = rootIndex
开发者ID:TenKeyAngle,项目名称:manuskript,代码行数:5,代码来源:outlineDelegates.py

示例13: __init__

# 需要导入模块: from PyQt5.QtWidgets import QStyledItemDelegate [as 别名]
# 或者: from PyQt5.QtWidgets.QStyledItemDelegate import __init__ [as 别名]
 def __init__(self, mdlPersos, parent=None):
     QStyledItemDelegate.__init__(self, parent)
     self.mdlPersos = mdlPersos
开发者ID:georgehank,项目名称:manuskript,代码行数:5,代码来源:outlineDelegates.py

示例14: __init__

# 需要导入模块: from PyQt5.QtWidgets import QStyledItemDelegate [as 别名]
# 或者: from PyQt5.QtWidgets.QStyledItemDelegate import __init__ [as 别名]
 def __init__(self, parent, attrs_widget):
     QStyledItemDelegate.__init__(self, parent)
     self.attrs_widget = attrs_widget
开发者ID:FreeOpcUa,项目名称:opcua-widgets,代码行数:5,代码来源:attrs_widget.py

示例15: __init__

# 需要导入模块: from PyQt5.QtWidgets import QStyledItemDelegate [as 别名]
# 或者: from PyQt5.QtWidgets.QStyledItemDelegate import __init__ [as 别名]
 def __init__(self, choices=None, parent=None):
     QStyledItemDelegate.__init__(self, parent)
     self.choices = choices if (choices is not None and type(choices) is list) else []
开发者ID:marcel-goldschen-ohm,项目名称:ModelViewPyQt,代码行数:5,代码来源:ComboBoxDelegateQt.py


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