PySide6.QtRemoteObjects.QRemoteObjectPendingCall

class QRemoteObjectPendingCall

封装异步方法调用的结果。更多

继承者: QRemoteObjectPendingCallWatcher

概要

方法

静态函数

注意

本文档可能包含从C++自动翻译到Python的代码片段。我们始终欢迎对代码片段翻译的贡献。如果您发现翻译问题,您也可以通过在我们的https:/bugreports.qt.io/projects/PYSIDE上创建工单来告知我们。

详细描述

class Error

此枚举类型指定远程调用的可能错误值:

常量

描述

QRemoteObjectPendingCall.NoError

没有发生错误。

QRemoteObjectPendingCall.InvalidMessage

远程调用完成前的默认错误状态。

__init__()
__init__(other)
Parameters:

其他QRemoteObjectPendingCall

error()
Return type:

错误

返回远程调用中的错误(如果有的话)。

static fromCompletedCall(returnValue)
Parameters:

returnValue – 对象

Return type:

QRemoteObjectPendingCall

isFinished()
Return type:

布尔

如果远程调用已完成,则返回 true,否则返回 false。

完成的调用将包括一个returnValueerror

returnValue()
Return type:

对象

返回远程调用的返回值。

returnValue 只有在远程调用完成且没有 error 时才有效。

waitForFinished([timeout=30000])
Parameters:

timeout – int

Return type:

布尔

最多阻塞 timeout 毫秒,直到远程调用完成。

成功时返回 true,否则返回 false