简体   繁体   中英

kivy Equivalent to Tkinter after()

Changing the UI of my application from Tkinter to Kivy I cannot figure out the Kivy equivalent to Tkinter .after() function:

Tkinter:

self.after(5000, self.functionX)

Kivy:

?????

Clock.schedule_once是你的朋友!

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

您可以使用Clock对象,它允许您像Tkinter .after方法一样安排回调。

Clock.schedule_interval(my_callback, 0.5)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM