qt5-qwebview.py
This commit is contained in:
parent
806593afa1
commit
4a95d0ae17
1 changed files with 20 additions and 0 deletions
20
qt5-qwebview.py
Normal file
20
qt5-qwebview.py
Normal 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_()
|
Loading…
Add table
Add a link
Reference in a new issue