PyQt/QWebChannel/README.md
2021-12-16 02:48:35 +08:00

12 lines
No EOL
412 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# QWebChannel
- 目录
- [和Js互相调用](#1和Js互相调用)
## 1、和Js互相调用
[运行 CallEachWithJs.py](CallEachWithJs.py)
通过`qwebchannel.js`和`QWebChannel.registerObject`通过中间件`WebSocket`进行对象和Javascript的交互类似于json rpc
该方法类似与`QWebEngineView`中的例子同时该demo也适用与nodejs。
![CallEachWithJs](ScreenShot/CallEachWithJs.gif)