Closed Cassianvale closed 1 month ago
当我打开示例项目滑动滚动条时出现了报错,其中siui\components\progress_bar\progress_bar.py文件255行有一个错误
Traceback (most recent call last): File "F:\PyQt-SiliconUI\siui\components\progress_bar\progress_bar.py", line 255, in paintEvent painter.drawArc(rect, start_angle, span_angle) TypeError: arguments did not match any overloaded call: drawArc(self, rect: QRectF, a: int, alen: int): argument 1 has unexpected type 'QRect' drawArc(self, r: QRect, a: int, alen: int): argument 2 has unexpected type 'float' drawArc(self, x: int, y: int, w: int, h: int, a: int, alen: int): argument 1 has unexpected type 'QRect'
需要把painter.drawArc(rect, start_angle, span_angle) 改为painter.drawArc(rect, int(start_angle), int(span_angle))
painter.drawArc(rect, start_angle, span_angle)
painter.drawArc(rect, int(start_angle), int(span_angle))
是的,可能是因为高版本的pyqt对类型限制更加严格,我这边用的是较低版本。 已修改,progress_bar.py会在我下一次提交时更新
progress_bar.py
当我打开示例项目滑动滚动条时出现了报错,其中siui\components\progress_bar\progress_bar.py文件255行有一个错误
需要把
painter.drawArc(rect, start_angle, span_angle)
改为painter.drawArc(rect, int(start_angle), int(span_angle))