0

I'm creating very simple quiz game, That i want to have delay limit on, so it starts and ends on specific time.

For example there is some function:

def Time():
    self.widget1.show()
    self.widget2.hide()

    SomeDelayWidget(60s)(self.SomeFunction)

I want this widget to send some kind of signal that activates specific function.

Sorted:

So is there any delay widget that will time out in specific seconds and after that send signal to some slot?

ShellRox
  • 2,532
  • 6
  • 42
  • 90

1 Answers1

2

Use a timer.

tmr = QtCore.QTimer()
tmr.setSingleShot(True)
tmr.timeout.connect(self.SomeFunction)
tmr.start(10000)
justengel
  • 6,132
  • 4
  • 26
  • 42