MCPcopy Create free account
hub / github.com/PyQt5/PyQt / updateUi

Method updateUi

QtChart/LineStack.py:67–80  ·  view source on GitHub ↗
(self, title, points)

Source from the content-addressed store, hash-verified

65 layout.addWidget(self.titleLabel)
66
67 def updateUi(self, title, points):
68 self.titleLabel.setText(title)
69 for serie, point in points:
70 if serie not in self.Cache:
71 item = ToolTipItem(
72 serie.color(),
73 (serie.name() or "-") + ":" + str(point.y()), self)
74 self.layout().addWidget(item)
75 self.Cache[serie] = item
76 else:
77 self.Cache[serie].setText(
78 (serie.name() or "-") + ":" + str(point.y()))
79 self.Cache[serie].setVisible(serie.isVisible()) # 隐藏那些不可用的项
80 self.adjustSize() # 调整大小
81
82
83class GraphicsProxyWidget(QGraphicsProxyWidget):

Callers 1

showMethod · 0.45

Calls 6

nameMethod · 0.80
yMethod · 0.80
addWidgetMethod · 0.80
ToolTipItemClass · 0.70
setTextMethod · 0.45
colorMethod · 0.45

Tested by

no test coverage detected