diff options
| author | nasrlol <nsrddyn@gmail.com> | 2024-12-03 00:32:26 +0100 |
|---|---|---|
| committer | nasrlol <nsrddyn@gmail.com> | 2024-12-03 00:32:26 +0100 |
| commit | 052714d13dee18143db6623b68ab3fde3a2ca59b (patch) | |
| tree | 59be7721ba2c664010ac3b45c3d0e081c4206c90 /source/main.py | |
| parent | 2d35af8096a2345ea69462f835a671751e012138 (diff) | |
trying to fix the pyside6 module
Diffstat (limited to 'source/main.py')
| -rw-r--r-- | source/main.py | 15 |
1 files changed, 7 insertions, 8 deletions
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__": |
