(self, status, index)
| 215 | bar.setPen(pen) |
| 216 | |
| 217 | def handleBarHoverd(self, status, index): |
| 218 | # 设置bar的画笔宽度 |
| 219 | bar = self.sender() # 信号发送者 |
| 220 | pen = bar.pen() |
| 221 | if not pen: |
| 222 | return |
| 223 | pen.setWidth(pen.width() + (1 if status else -1)) |
| 224 | bar.setPen(pen) |
| 225 | |
| 226 | def initChart(self): |
| 227 | self._chart = QChart(title="柱状图堆叠") |