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

Method __init__

Demo/CircleLine.py:112–126  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

110class CircleLineWindow(QWidget):
111
112 def __init__(self, *args, **kwargs):
113 super(CircleLineWindow, self).__init__(*args, **kwargs)
114 # 设置背景颜色
115 palette = self.palette()
116 palette.setColor(palette.Background, backgroundColor)
117 self.setAutoFillBackground(True)
118 self.setPalette(palette)
119 # 获取屏幕大小
120 geometry = QApplication.instance().desktop().availableGeometry()
121 self.screenWidth = geometry.width()
122 self.screenHeight = geometry.height()
123 self._canDraw = True
124 self._firstDraw = True
125 self._timer = QTimer(self, timeout=self.update)
126 self.init()
127
128 def init(self):
129 points.clear()

Callers

nothing calls this directly

Calls 5

initMethod · 0.95
setColorMethod · 0.80
__init__Method · 0.45
widthMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected