You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
308 B
Python
21 lines
308 B
Python
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_()
|