ChinaIceF / PyQt-SiliconUI

A powerful and artistic UI library based on PyQt5,基于 PyQt5 的UI框架,灵动、优雅而轻便
GNU General Public License v3.0
433 stars 43 forks source link

progress_bar.py文件报错 #106

Closed Cassianvale closed 1 month ago

Cassianvale commented 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))

ChinaIceF commented 1 month ago

是的,可能是因为高版本的pyqt对类型限制更加严格,我这边用的是较低版本。 已修改,progress_bar.py会在我下一次提交时更新