Kivy Equivalent to Tkinter after ()

Changing the user interface of my application from Tkinterto KivyI cannot understand the Kivy equivalent of the Tkinter function .after():

Tkinter:

self.after(5000, self.functionX)

Kivy:

?????
+4
source share
2 answers

Clock.schedule_once - your friend!

Clock.schedule_once(function_x, 5.0) # like the 5000 ms in your example
+5
source

You can use the Clock object , which allows you to schedule a callback just like the Tkinter method .after.

Clock.schedule_interval(my_callback, 0.5)
0
source

Source: https://habr.com/ru/post/1663215/


All Articles