QtRemoteObjects QML Type
全局对象 QtRemoteObjects 为在 QML 中处理远程类型提供了有用的函数。更多内容...
| Import Statement: | import QtRemoteObjects 6.12 |
方法
- Promise watch(QRemoteObjectPendingCall reply, int timeout)
详细说明
方法文档
Promise watch(QRemoteObjectPendingCall reply, int timeout = 30000)
将副本返回的值(由 `reply` 表示)封装为 JavaScript Promise。可通过 `timeout` 设置超时时间。默认超时时间为 30 秒。
QtRemoteObjects.watch(replica.fetchDetails(identifier))
.then(function(value) { details = value },
function(error) { console.log("error fetching details:", error) })© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.