From 39df9c0bb0e3e143dc402cbb3a9137e9f2ef39b5 Mon Sep 17 00:00:00 2001 From: korrykatti Date: Wed, 3 Apr 2024 16:44:11 +0530 Subject: [PATCH] I am failing my most important exams --- README.md | 5 +++++ appfiles/comm/community.py | 25 ++++++++++--------------- index.py | 2 +- requirements.txt | 2 ++ 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 340349a..c28b370 100644 --- a/README.md +++ b/README.md @@ -23,3 +23,8 @@ yay -S python-pyqt5 qt5-webengine yay -S python-gobject python-gobject-cairo gtk3 webkit2gtk +sudo pacman -S base-devel + +sudo pacman -S python-gobject python-cairo gtk3 webkit2gtk + + diff --git a/appfiles/comm/community.py b/appfiles/comm/community.py index 31a9af4..d443441 100644 --- a/appfiles/comm/community.py +++ b/appfiles/comm/community.py @@ -1,26 +1,21 @@ import sys -from PyQt5.QtWidgets import QApplication, QMainWindow, QWidget, QVBoxLayout +from PyQt5.QtWidgets import QApplication, QMainWindow from PyQt5.QtCore import QUrl from PyQt5.QtWebEngineWidgets import QWebEngineView -class WebWindow(QMainWindow): - def __init__(self, url): +class MainWindow(QMainWindow): + def __init__(self): super().__init__() - - self.setWindowTitle("Embedded Web Page") - self.setGeometry(100, 100, 800, 600) - self.central_widget = QWidget() - self.setCentralWidget(self.central_widget) - self.layout = QVBoxLayout(self.central_widget) + self.setWindowTitle("Embedded Web Browser") + self.setGeometry(100, 100, 800, 600) - self.browser = QWebEngineView() - self.layout.addWidget(self.browser) - self.browser.load(QUrl(url)) + web_view = QWebEngineView() + web_view.setUrl(QUrl('https://example.com')) # Create QUrl object from URL string + self.setCentralWidget(web_view) -if __name__ == "__main__": +if __name__ == '__main__': app = QApplication(sys.argv) - url = "https://www.example.com" - window = WebWindow(url) + window = MainWindow() window.show() sys.exit(app.exec_()) diff --git a/index.py b/index.py index acca983..36fe8f4 100644 --- a/index.py +++ b/index.py @@ -168,7 +168,7 @@ def optionmenu_callback(choice): create_labels() elif choice == "Client Update": app.destroy() # Close the current window - subprocess.Popen(["python", "updater.py"]) # Run updater.py + subprocess.Popen(["python", "main.py"]) # Run main.py # Callback Function for Libmenu def libmenu_callback(choice): diff --git a/requirements.txt b/requirements.txt index aa3e00e..f55aa9f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -20,4 +20,6 @@ PyQtWebEngine PyQt5 tkhtmlview tkinterweb +PyGObject +