简体   繁体   English

kivy等于Tkinter之后()

[英]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: 将我的应用程序的UI从Tkinter更改为Kivy我无法弄清楚Kivy等同于Tkinter .after()函数:

Tkinter: Tkinter的:

self.after(5000, self.functionX)

Kivy: 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)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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