MCPcopy Index your code
hub / github.com/PyQt5/PyQt / __init__

Method __init__

QListView/CustomWidgetSortItem.py:36–41  ·  view source on GitHub ↗
(self, text, *args, **kwargs)

Source from the content-addressed store, hash-verified

34class CustomWidget(QWidget):
35
36 def __init__(self, text, *args, **kwargs):
37 super(CustomWidget, self).__init__(*args, **kwargs)
38 layout = QHBoxLayout(self)
39 layout.setContentsMargins(0, 0, 0, 0)
40 layout.addWidget(QLineEdit(text, self))
41 layout.addWidget(QPushButton('x', self))
42
43 def sizeHint(self):
44 # 决定item的高度

Callers

nothing calls this directly

Calls 2

addWidgetMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected