Kivy is a platform independent GUI tool in Python. As it can be run on Android, IOS, linux and Windows etc. It is basically used to develop the Android application, but it does not mean that it can not be used on Desktops applications.
In this we are going to see how can we create a stopwatch using label .
In the code i am creating just a counter using label in which when you set the time in seconds it will start decreasing like a countdown and in the second we will do the same by using clock object.
1) Kivy provides Clock objects.
2) Clock objects can be made to call a function when a specified time period has elapsed.
3) A clock object in Kivy can be configured to call a function upon every elapse of a time duration or only once.
It is good to use kivy inbuilt module while working with clock:
from kivy.clock import Clock
Basic Approach: 1) import kivy 2) import kivyApp 3) import label 4) import Animation 5) Import clock 6) import kivy properties(only needed one) 7) Set minimum version(optional) 8) Create Label class 9) Create App class 10) return Layout/widget/Class(according to requirement) 11) Run an instance of the class
# Simple Approach:
Note: Countdown start from 100 and ends on 0
# Now By using Clock Object:
Note: This starts from 0 and run until you cut the window
- Python | Create a stopwatch using clock object in kivy using .kv file
- Create a stopwatch using python
- Python | Create a digital clock using Tkinter
- Create digital clock using Python-Turtle
- Create Analog Clock using PyQt5 in Python
- PyQt5 - Create a digital clock
- How to create a list of object in Python class
- Python | time.clock() method
- Draw Clock Design using Turtle in Python
- Object Oriented Programming in Python | Set 2 (Data Hiding and Object Printing)
- Object Oriented Programming in Python | Set 1 (Class, Object and Members)
- PyQt5 – Digital StopWatch
- Python | PageLayout in Kivy
- Python | StackLayout in Kivy
- GridLayouts in Kivy | Python
- Python | Kivy .kv File
- Python| AnchorLayout in Kivy
- Python | Accordion in kivy
- Python | Scatter in kivy
- Python | Animation in Kivy
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.