qt5-qwebview.py

This commit is contained in:
neingeist 2019-09-22 12:30:31 +02:00
parent 806593afa1
commit 4a95d0ae17

20
qt5-qwebview.py Normal file
View file

@ -0,0 +1,20 @@
from PyQt5.QtWidgets import QApplication
from PyQt5.QtWebKitWidgets import QWebView
app = QApplication([])
win = QWebView()
html = '''<html>
<head>
<title>A Sample Page</title>
</head>
<body>
<h1>Hello, World!</h1>
<hr />
I have nothing to say.
</body>
</html>'''
win.setHtml(html)
win.show()
app.exec_()