summaryrefslogtreecommitdiff
path: root/source/main.py
diff options
context:
space:
mode:
authorAbdellah El Morabit <nsrddyn@gmail.com>2024-12-02 13:36:55 +0100
committerAbdellah El Morabit <nsrddyn@gmail.com>2024-12-02 13:36:55 +0100
commit822fff770e80b427908de348000f6d43306089cc (patch)
tree17e44350bc7b7436cb72e2372224441f14505a2b /source/main.py
parent35b476a90b585186161ab91ef9b73d029a2ee834 (diff)
small file system bug fix
Diffstat (limited to 'source/main.py')
-rw-r--r--source/main.py19
1 files changed, 14 insertions, 5 deletions
diff --git a/source/main.py b/source/main.py
index 62e47b2..20cc29b 100644
--- a/source/main.py
+++ b/source/main.py
@@ -1,16 +1,25 @@
-from PySide6.QtWidgets import QApplication, QLabel, QMainWindow, QPushButton, QLabel, QVBoxLayout, QWidget
+from PySide6.QtWidgets import (
+ QApplication,
+ QLabel,
+ QMainWindow,
+ QPushButton,
+ QLabel,
+ QVBoxLayout,
+ QWidget,
+)
from PySide6.QtCore import Qt
-from hardware_driver import lcd
+import hardware_driver as lcd
import sys
L = lcd()
+
class mainWindow(QMainWindow):
def __init__(self):
super().__init__()
self.setWindowTitle("I2C CONTROLLER")
- self.setGeometry(200,100,800,300)
+ self.setGeometry(200, 100, 800, 300)
self.mainUI()
def mainUI(self):
@@ -22,7 +31,7 @@ class mainWindow(QMainWindow):
self.button = QPushButton("Clear Screen", self)
self.button.clicked.connect(self.clear_screen)
-
+
layout = QVBoxLayout()
layout.addWidget(self.label)
layout.addWidget(self.button)
@@ -33,9 +42,9 @@ class mainWindow(QMainWindow):
lcd.clear()
self.label.setText("Cleared the LCD screen", self)
+
if __name__ == "__main__":
app = QApplication(sys.argv)
window = mainWindow()
window.show()
sys.exit(app.exec())
-