Skip to content

QtWebkit和QWebEngineView与Javascript交互 | PyQt5 #32

Description

@892768447

https://pyqt5.com/qtwebjs.html

以前还是QWebView的时候和Javascript交互起来很方便,但是到了Qt5.6以后改用了QWebEngineView,并通过其提供的qwebchannel.js来进行交互。可能是由于刚出来的原因,这玩意儿有个bug就是必须在每次加载页面的时候手动注入,跳转页面后就失效了,需要手动注入,目前有没有修复具体未测试。这里对QWebView和QWebEngineView与Js交互都做了一个示例。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions