def timerEvent(self, e):
if self.step >=100:
self.timer.stop()
self.actiondownload.setText('完成')
return
self.step = self.step + 20
self.progressBar.setValue(self.step)
def doAction(self, value):
if self.timer.isActive():
self.timer.stop()
self.actiondownload.setText('开始')
else:
self.timer.start(100, self)
self.actiondownload.setText('停止')
PyQt中进度条progressBar使用方法
最新推荐文章于 2024-06-19 23:05:20 发布