<tfoot id='LmfOr'></tfoot>

    1. <small id='LmfOr'></small><noframes id='LmfOr'>

      • <bdo id='LmfOr'></bdo><ul id='LmfOr'></ul>
      <legend id='LmfOr'><style id='LmfOr'><dir id='LmfOr'><q id='LmfOr'></q></dir></style></legend>
      <i id='LmfOr'><tr id='LmfOr'><dt id='LmfOr'><q id='LmfOr'><span id='LmfOr'><b id='LmfOr'><form id='LmfOr'><ins id='LmfOr'></ins><ul id='LmfOr'></ul><sub id='LmfOr'></sub></form><legend id='LmfOr'></legend><bdo id='LmfOr'><pre id='LmfOr'><center id='LmfOr'></center></pre></bdo></b><th id='LmfOr'></th></span></q></dt></tr></i><div id='LmfOr'><tfoot id='LmfOr'></tfoot><dl id='LmfOr'><fieldset id='LmfOr'></fieldset></dl></div>

      用kivy制作时钟

      时间:2023-10-10
    2. <small id='nSy7Q'></small><noframes id='nSy7Q'>

        <i id='nSy7Q'><tr id='nSy7Q'><dt id='nSy7Q'><q id='nSy7Q'><span id='nSy7Q'><b id='nSy7Q'><form id='nSy7Q'><ins id='nSy7Q'></ins><ul id='nSy7Q'></ul><sub id='nSy7Q'></sub></form><legend id='nSy7Q'></legend><bdo id='nSy7Q'><pre id='nSy7Q'><center id='nSy7Q'></center></pre></bdo></b><th id='nSy7Q'></th></span></q></dt></tr></i><div id='nSy7Q'><tfoot id='nSy7Q'></tfoot><dl id='nSy7Q'><fieldset id='nSy7Q'></fieldset></dl></div>
        <tfoot id='nSy7Q'></tfoot>
        <legend id='nSy7Q'><style id='nSy7Q'><dir id='nSy7Q'><q id='nSy7Q'></q></dir></style></legend>
          <tbody id='nSy7Q'></tbody>

            <bdo id='nSy7Q'></bdo><ul id='nSy7Q'></ul>

                本文介绍了用kivy制作时钟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我是 Kivy 的新手,我正在尝试更好地处理事件以及框架的一些基础知识.

                I'm new to Kivy, and I'm trying to get a better handle on Events, as well as a few basics of the framework.

                为此,谁能提供在 Kivy 中实现的简单时钟的代码,它显示当前时间并每秒更新一次?

                For that purpose, can anyone provide the code for a simple clock implemented in Kivy, which shows the current time, and updates every second?

                推荐答案

                这是一个非常简单的时钟:

                Here's an extremely simple clock:

                from kivy.app import App
                from kivy.uix.label import Label
                from kivy.clock import Clock
                
                import time
                
                class IncrediblyCrudeClock(Label):
                    def update(self, *args):
                        self.text = time.asctime()
                
                class TimeApp(App):
                    def build(self):
                        crudeclock = IncrediblyCrudeClock()
                        Clock.schedule_interval(crudeclock.update, 1)
                        return crudeclock
                
                if __name__ == "__main__":
                    TimeApp().run()
                

                这篇关于用kivy制作时钟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:在 Kivy 中更改按钮的背景颜色 下一篇:如何在 kivy 中开始/使用 matplotlib

                相关文章

                最新文章

                <i id='sIDef'><tr id='sIDef'><dt id='sIDef'><q id='sIDef'><span id='sIDef'><b id='sIDef'><form id='sIDef'><ins id='sIDef'></ins><ul id='sIDef'></ul><sub id='sIDef'></sub></form><legend id='sIDef'></legend><bdo id='sIDef'><pre id='sIDef'><center id='sIDef'></center></pre></bdo></b><th id='sIDef'></th></span></q></dt></tr></i><div id='sIDef'><tfoot id='sIDef'></tfoot><dl id='sIDef'><fieldset id='sIDef'></fieldset></dl></div>
              1. <tfoot id='sIDef'></tfoot>
                • <bdo id='sIDef'></bdo><ul id='sIDef'></ul>
              2. <legend id='sIDef'><style id='sIDef'><dir id='sIDef'><q id='sIDef'></q></dir></style></legend>
              3. <small id='sIDef'></small><noframes id='sIDef'>