added simple webview interface

This commit is contained in:
2023-01-23 11:43:55 +01:00
parent a2c67f0f59
commit af51087bbe

18
grum/webview.py Normal file
View File

@ -0,0 +1,18 @@
from PyQt5.QtCore import QUrl
from PyQt5.QtWebKitWidgets import QWebView
class WebView(QWebView):
def __init__(self, url, title=None):
super().__init__()
self.url = QUrl(url)
if title:
self.setWindowTitle(title)
def show(self):
self.load(self.url)
super().show()