added simple webview interface
This commit is contained in:
18
grum/webview.py
Normal file
18
grum/webview.py
Normal 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()
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user