Add main application logic, UI components, and logging setup

This commit is contained in:
2026-05-14 21:13:58 +02:00
parent 76b33009bb
commit 2118a85ed6
5 changed files with 219 additions and 0 deletions

22
Widget/main_window.py Normal file
View File

@@ -0,0 +1,22 @@
import random
from PySide6 import QtCore, QtWidgets
class MyWidget(QtWidgets.QWidget):
def __init__(self):
super().__init__()
self.hello = ["Hallo Welt", "Hei maailma", "Hola Mundo", "Привет мир"]
self.button = QtWidgets.QPushButton("Click me!")
self.text = QtWidgets.QLabel("Hello World", alignment=QtCore.Qt.AlignCenter)
self.layout = QtWidgets.QVBoxLayout(self)
self.layout.addWidget(self.text)
self.layout.addWidget(self.button)
self.button.clicked.connect(self.magic)
@QtCore.Slot()
def magic(self):
self.text.setText(random.choice(self.hello))