qt - 有没有办法通过 Qt WebChannel 使用同步函数调用?

标签 qt qtwebengine

Qt WebKit Bridge 不同,我找不到使用 Qt WebChannelJS 端 使用同步函数调用。

有什么办法吗?

最佳答案

我觉得没有办法。文档中说:QWebChannel

Note that all communication between the HTML client and the QML/C++ server is asynchronous.

此外,在这个博客中正是这样说的:Bridge the gap between C++/QML and the web

But, contrary to the WebKit Bridge, the API provided by the WebChannel is completely asynchronous.

希望对您有所帮助。

关于qt - 有没有办法通过 Qt WebChannel 使用同步函数调用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33536814/

相关文章:

c++ - QWeb引擎页面 : toHtml returns an empty string

qt - 如何在运行时确定 QtWebEngine 在 Qt 5 中使用哪个 Chrome 版本?

python - 无法使用 QWebEnginePage::runJavaScript() 更改背景图像

qt - 如何从 Qt 5.5 git 源构建 qtwebengine

c++ - 部署 GStreamer SDK 应用程序

python - 如何使用PyQt发送http请求?

c++ - 使用 QtDesigner 创建的 QWidget 添加到 QToolBar 时不可见

c++ - Qt QSettings 尝试创建 ini 文件但没有创建为什么?

c++ - QWinTaskbarProgress 我做错了什么?

qt - 如何在 Windows 和 MSVC 2015 上构建 Qt 5.5 QtWebEngine