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

Method __init__

QtChart/PieChart.py:29–41  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

27class Window(QChartView):
28
29 def __init__(self, *args, **kwargs):
30 super(Window, self).__init__(*args, **kwargs)
31 self.resize(400, 300)
32 # 抗锯齿
33 self.setRenderHint(QPainter.Antialiasing)
34
35 # 图表
36 chart = QChart()
37 self.setChart(chart)
38 # 设置标题
39 chart.setTitle('Simple piechart example')
40 # 添加Series
41 chart.addSeries(self.getSeries())
42
43 def getSeries(self):
44 series = QPieSeries()

Callers

nothing calls this directly

Calls 3

resizeMethod · 0.95
getSeriesMethod · 0.95
setTitleMethod · 0.45

Tested by

no test coverage detected