diff --git a/appfiles/comm/community.py b/appfiles/comm/community.py index 46d463c..31a9af4 100644 --- a/appfiles/comm/community.py +++ b/appfiles/comm/community.py @@ -1,23 +1,26 @@ import sys +from PyQt5.QtWidgets import QApplication, QMainWindow, QWidget, QVBoxLayout from PyQt5.QtCore import QUrl -from PyQt5.QtWidgets import QApplication, QMainWindow from PyQt5.QtWebEngineWidgets import QWebEngineView -class MainWindow(QMainWindow): - def __init__(self): +class WebWindow(QMainWindow): + def __init__(self, url): 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.browser = QWebEngineView() - self.setCentralWidget(self.browser) - - # Load URL - url = QUrl("https://www.wikipedia.org") - self.browser.setUrl(url) + self.layout.addWidget(self.browser) + self.browser.load(QUrl(url)) if __name__ == "__main__": app = QApplication(sys.argv) - window = MainWindow() + url = "https://www.example.com" + window = WebWindow(url) window.show() sys.exit(app.exec_()) diff --git a/appfiles/repup.py b/appfiles/repup.py index 82794c9..358b875 100644 --- a/appfiles/repup.py +++ b/appfiles/repup.py @@ -49,7 +49,7 @@ def check_for_updates(): def main(): while True: check_for_updates() - time.sleep(60) # Check for updates every one minute + time.sleep(600) # Check for updates every one minute if __name__ == "__main__": main() diff --git a/requirements.txt b/requirements.txt index 720547a..aa3e00e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,3 +18,6 @@ pygtk webkit PyQtWebEngine PyQt5 +tkhtmlview +tkinterweb +