我想将原始 HTML 传递给 QWebEngineView 但出现错误
I would like to pass raw HTML to QWebEngineView but getting errors
app = QApplication(sys.argv)
abc = pd.read_csv("filepath")
web = QWebEngineView()
web.load(QUrl.fromLocalFile(abc.to_html())
web.show()
sys.exit(app.exec_())
如果要加载 html 则必须使用 setHtml()
方法:
web.setHtml(abc.to_html())
app = QApplication(sys.argv)
abc = pd.read_csv("filepath")
web = QWebEngineView()
web.load(QUrl.fromLocalFile(abc.to_html())
web.show()
sys.exit(app.exec_())
如果要加载 html 则必须使用 setHtml()
方法:
web.setHtml(abc.to_html())