Created
October 26, 2018 22:55
-
-
Save sakurai-youhei/0d8e444b0b2986e98c0f625f68193e08 to your computer and use it in GitHub Desktop.
Render HTML on the fly with QWebEngineView
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sys import argv | |
from sys import exit | |
from pygal import Bar | |
from PyQt5.QtWebEngineWidgets import QWebEngineView | |
from PyQt5.QtWidgets import QApplication | |
app = QApplication(argv) | |
view = QWebEngineView() | |
view.setHtml(Bar()(1, 3, 3, 7)(1, 6, 6, 4).render(True)) | |
view.show() | |
exit(app.exec_()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment