QtRemoteObjects 是为在 QML 中处理远程类型提供有用功能的全局对象。 更多...
import 语句: | import QtRemoteObjects 6.7 |
Promise watch ( QRemoteObjectPendingCall reply , int timeout = 30000) |
Encapsulates the return value, represented by reply , from a replica in a JavaScript Promise. A timeout can be set with timeout . The default timeout value is 30 seconds.
QtRemoteObjects.watch(replica.fetchDetails(identifier)) .then(function(value) { details = value }, function(error) { console.log("error fetching details:", error) })