- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
是否可以在没有 websockets 的情况下使用 QT QWebChannel,但使用 WebKit ICP?我只找到了使用 webSockets 的示例。
最佳答案
不幸的是,documentation指出:
It works on all browsers that support Qt WebSockets, [...]. Additionally, a custom transport mechanism can also be implemented using Qt WebSockets to support Qt WebChannel-based communication.
似乎没有 WebSockets
就无法使用它,这可以解释为什么您找到的所有示例实际上都在使用它们。
无论如何,它还声明:
The transport mechanism is supported out of the box by the two popular web engines, Qt WebKit 2 and Qt WebEngine (experimental).
尽管它是实验性的,但它看起来像是 WebSockets
的替代品。实际上,在深入研究链接文档时,我发现了 that page其中提到 WebKit
它在内部实现了所需的接口(interface),可以用来代替 WebSockets
,但没有提供示例。
您可以在整个链接页面中找到备用信息,例如:
For HTML clients run inside Qt WebKit, you can load the file via qrc:///qtwebchannel/qwebchannel.js. For external clients you will need to copy the file to your webserver.
然后,根据我的理解,在这种情况下不使用 WebSocket
,它会简要描述要在这些客户端上实现相同目标的步骤。
也就是说,在我看来,基于 WebSockets
的解决方案是建议的解决方案,因此您可能应该重新考虑您的架构并使用它们。否则,请准备好处理实验性和记录不佳的功能。
关于html - 如何在没有 webSockets 的情况下使用 QT WebChannel,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34774940/
与 Qt WebKit Bridge 不同,我找不到使用 Qt WebChannel 在 JS 端 使用同步函数调用。 有什么办法吗? 最佳答案 我觉得没有办法。文档中说:QWebChannel No
是否可以在没有 websockets 的情况下使用 QT QWebChannel,但使用 WebKit ICP?我只找到了使用 webSockets 的示例。 最佳答案 不幸的是,documentat
因此,我最近将 angularfire2 更新到了最新最好的版本,但遇到了一些问题。我按照 angularfire2 开发人员指南安装了项目,但仍然出现以下错误: [18:57:50] ionic-
我想向 JS 公开一些 C++ 对象。到目前为止,我已经使用修饰符 Q_OBJECT Q_POPERTY Q_INVOKABLE 等将对象正确暴露给 QML。该部分工作正常。 当然,在 C++ 方面,
我已将我的 firebase 链接到我的项目,以便将其用于 Google 身份验证,但这个问题不断出现。 import firebase from "firebase/app"; import "fi
对于桌面(Windows、Mac、Ubuntu),有一个QWebEngineView,对于移动设备(Android、iOS),有一个原生的QWebView。 不幸的是,mobiles don't su
我创建了简单的 React Native 屏幕,可以将数据存储到 Firestore。我试过下面的代码,但它没有工作,而不是抛出一些错误。任何人都可以帮助我吗? 我的代码: App.js import
我是一名优秀的程序员,十分优秀!