This commit is contained in:
dengrb1
2023-05-26 23:08:19 +08:00
committed by GitHub
parent 04ada7edf1
commit 88aa088b95
3 changed files with 19 additions and 2 deletions

25
aitianhu.pyw Normal file
View File

@@ -0,0 +1,25 @@
import sys
from PyQt5.QtCore import QUrl
from PyQt5.QtWidgets import QApplication, QMainWindow, QAction
from PyQt5.QtWebEngineWidgets import QWebEngineView
class Browser(QMainWindow):
def __init__(self):
super().__init__()
self.setWindowTitle('浏览器')
self.browser = QWebEngineView()
self.browser.setUrl(QUrl('https://chat13.aitianhu.top'))
self.setCentralWidget(self.browser)
refresh_button = QAction('刷新', self)
refresh_button.triggered.connect(self.browser.reload)
self.toolbar = self.addToolBar('Refresh')
self.toolbar.addAction(refresh_button)
# mainloop
app = QApplication(sys.argv)
browser = Browser()
browser.showMaximized()
sys.exit(app.exec_())