简体   繁体   English

我想将原始 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_())

If you are going to load html then you must use the setHtml() method:如果要加载 html 则必须使用setHtml()方法:

web.setHtml(abc.to_html())

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM