From 052714d13dee18143db6623b68ab3fde3a2ca59b Mon Sep 17 00:00:00 2001 From: nasrlol Date: Tue, 3 Dec 2024 00:32:26 +0100 Subject: trying to fix the pyside6 module --- source/__pycache__/features.cpython-312.pyc | Bin 0 -> 9305 bytes source/__pycache__/hardware_driver.cpython-312.pyc | Bin 0 -> 4078 bytes source/main.py | 15 +++++++-------- 3 files changed, 7 insertions(+), 8 deletions(-) create mode 100644 source/__pycache__/features.cpython-312.pyc create mode 100644 source/__pycache__/hardware_driver.cpython-312.pyc diff --git a/source/__pycache__/features.cpython-312.pyc b/source/__pycache__/features.cpython-312.pyc new file mode 100644 index 0000000..f4fb57d Binary files /dev/null and b/source/__pycache__/features.cpython-312.pyc differ diff --git a/source/__pycache__/hardware_driver.cpython-312.pyc b/source/__pycache__/hardware_driver.cpython-312.pyc new file mode 100644 index 0000000..0ff8d39 Binary files /dev/null and b/source/__pycache__/hardware_driver.cpython-312.pyc differ diff --git a/source/main.py b/source/main.py index c587c6e..95c7b0c 100644 --- a/source/main.py +++ b/source/main.py @@ -6,14 +6,13 @@ from PySide6.QtWidgets import ( QVBoxLayout, QWidget, ) - from PySide6.QtCore import Qt import hardware_driver as lcd import features as fe import sys -F = fe.feat() -L = lcd.LCD() +F = fe.feat() # Assuming 'feat' is a class in your 'features' module +L = lcd.LCD() # Assuming 'LCD' is a class in your 'hardware_driver' module class mainWindow(QMainWindow): @@ -24,8 +23,8 @@ class mainWindow(QMainWindow): self.mainUI() def mainUI(self): - central_widget = QWidget(self) - self.setCentralWidget(central_Widget) + central_widget = QWidget(self) # Fixed variable name (capital 'C' to lowercase) + self.setCentralWidget(central_widget) self.label = QLabel("CONNECTED TO I2C DEVICE", self) self.label.setAlignment(Qt.AlignCenter) @@ -39,9 +38,9 @@ class mainWindow(QMainWindow): central_widget.setLayout(layout) - def clear_screen(): - fe.clear() - self.label.setText("Cleared the LCD screen", self) + def clear_screen(self): # Added 'self' as the first argument + F.clear() # Call the clear method from 'feat' object + self.label.setText("Cleared the LCD screen") # Update the label text if __name__ == "__main__": -- cgit v1.2.3-70-g09d2