This commit is contained in:
dengrb1
2023-05-07 22:16:11 +08:00
committed by GitHub
parent cc39e4ed36
commit 73b62403ef
4 changed files with 59 additions and 14 deletions

23
lbbai.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://link.lbbai.com'))
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_())