本文整理汇总了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)
示例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
示例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 = {}
示例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 = {}
示例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)
示例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
示例7: __init__
# 需要导入模块: from PyQt5.QtWidgets import QStyledItemDelegate [as 别名]
# 或者: from PyQt5.QtWidgets.QStyledItemDelegate import __init__ [as 别名]
def __init__(self, parent=None):
QStyledItemDelegate.__init__(self, parent)
示例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
示例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
示例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
示例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
示例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
示例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
示例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
示例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 []