MCPcopy
hub / github.com/PyQt5/PyQt / __init__

Method __init__

QGraphicsView/DragGraphics.py:96–111  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

94class DragGraphics(QWidget):
95
96 def __init__(self, *args, **kwargs):
97 super(DragGraphics, self).__init__(*args, **kwargs)
98 self.resize(800, 600)
99 layout = QHBoxLayout(self)
100
101 # 左侧树形控制
102 self.treeWidget = QTreeWidget(self)
103 self.treeWidget.header().setVisible(False)
104 self.treeWidget.setMaximumWidth(300)
105 layout.addWidget(self.treeWidget)
106
107 # 右侧图形显示
108 self.graphicsView = GraphicsView(self)
109 layout.addWidget(self.graphicsView)
110
111 self._init_trees()
112
113 def _init_trees(self):
114 """初始化树形控件中的图形节点列表"""

Callers

nothing calls this directly

Calls 5

_init_treesMethod · 0.95
addWidgetMethod · 0.80
GraphicsViewClass · 0.70
__init__Method · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected