Added missing files and removed unnessesary ones

This commit is contained in:
2023-07-16 16:44:42 +03:00
parent c3fa5367c3
commit 199dd693e4
41 changed files with 1442 additions and 50 deletions

37
Python/clock/main.py Executable file
View File

@ -0,0 +1,37 @@
import sys
from time import strftime
from PyQt6.QtCore import QTimer
from PyQt6.QtWidgets import QApplication, QLCDNumber, QVBoxLayout, QWidget
class Window(QWidget):
def __init__(self):
super().__init__()
self.setGeometry(100, 100, 800, 400)
self.setWindowTitle("Clock")
vbox = QVBoxLayout()
self.timer = QTimer()
self.timer.timeout.connect(self.update_clock)
self.timer.start(200)
self.lcd = QLCDNumber()
vbox.addWidget(self.lcd)
self.setLayout(vbox)
def update_clock(self) -> None:
time_ = strftime("%H:%M:%S")
self.lcd.setDigitCount(8)
self.lcd.display(time_)
def main():
app = QApplication(sys.argv)
window = Window()
window.show()
sys.exit(app.exec())
if __name__ == "__main__":
main()