PyQt中进度条progressBar使用方法

mac2026-04-11  3

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('停止')
最新回复(0)