From f96261f4fe7fb6df3fe2b2396131552e86c5e6eb Mon Sep 17 00:00:00 2001 From: dengrb1 <125752069+dengrb1@users.noreply.github.com> Date: Thu, 4 May 2023 21:52:42 +0800 Subject: [PATCH] chatWEB --- bnu120.pyw | 27 +++++++++++++++++++++++++++ xz.pyw | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/bnu120.pyw b/bnu120.pyw index e69de29..cbcb503 100644 --- a/bnu120.pyw +++ b/bnu120.pyw @@ -0,0 +1,27 @@ +from PyQt5.QtCore import QUrl +from PyQt5.QtWidgets import QApplication, QMainWindow, QToolBar, QAction +from PyQt5.QtWebEngineWidgets import QWebEngineView + +class BrowserWindow(QMainWindow): + def __init__(self): + super().__init__() + self.setWindowTitle("Chat Browser") + self.setGeometry(100, 100, 800, 600) + + # Create the QWebEngineView widget and set the URL to "https://chat.extkj.cn" + self.web_view = QWebEngineView(self) + self.web_view.load(QUrl("https://chat.1.bnu120.space")) + self.setCentralWidget(self.web_view) + + # Create the QToolBar widget and add a QAction for the refresh button + toolbar = QToolBar(self) + self.addToolBar(toolbar) + refresh_action = QAction("Refresh", self) + refresh_action.triggered.connect(self.web_view.reload) + toolbar.addAction(refresh_action) + +if __name__ == "__main__": + app = QApplication([]) + window = BrowserWindow() + window.show() + app.exec_() diff --git a/xz.pyw b/xz.pyw index 506e26e..8c888d1 100644 --- a/xz.pyw +++ b/xz.pyw @@ -25,7 +25,7 @@ def qdymys(): open_exe("qdymys") def lbbai(): - webbrowser.open("https://link.lbbai.com") + open_exe('bnu120') def fh(): root.destroy()