Skip to content

Instantly share code, notes, and snippets.

@jef-n
Created January 26, 2012 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jef-n/1682168 to your computer and use it in GitHub Desktop.
Save jef-n/1682168 to your computer and use it in GitHub Desktop.
def pbnPlay(self):
self.slider.setRange(0, 100)
self.slider.setValue(0)
self.timer = QTimer()
self.timer.timeout.connect(self.stepForward)
self.timer.start(1000)
def stepForward(self):
self.slider.setValue( self.slider.value() + 1 )
if self.slider.value() >= self.slider.maximum():
self.timer.stop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment