This commit is contained in:
dengrb1
2023-05-24 17:14:09 +08:00
committed by GitHub
parent 72f9f649c6
commit f750ab9840
4 changed files with 54 additions and 6 deletions

23
xjai.pyw Normal file
View File

@@ -0,0 +1,23 @@
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://home.xjai.cc'))
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)
app = QApplication(sys.argv)
browser = Browser()
browser.showMaximized()
sys.exit(app.exec_())