PyQt中进度条progressBar使用方法

 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)