封装异步方法调用的结果。 更多...
| 头: | #include <QRemoteObjectPendingCall> |
| qmake: | QT += remoteobjects |
| 继承者: |
QRemoteObjectPendingCallWatcher and QRemoteObjectPendingReply |
| enum | Error { NoError, InvalidMessage } |
| QRemoteObjectPendingCall::Error | error () const |
| bool | isFinished () const |
| QVariant | returnValue () const |
| bool | waitForFinished (int timeout = 30000) |
此枚举类型指定用于远程调用的可能错误值:
| 常量 | 值 | 描述 |
|---|---|---|
QRemoteObjectPendingCall::NoError
|
0
|
没有出现错误。 |
QRemoteObjectPendingCall::InvalidMessage
|
1
|
远程调用完成前的默认错误状态。 |
返回错误,若有的话,从远程调用。
返回 true 若远程调用已完成,false 否则。
已完成调用将包括 returnValue or error .
返回远程调用的返回值。
returnValue will only be valid when the remote call has finished and there are no error 。
阻塞最多 timeout 毫秒,直到远程调用已完成。
返回
true
当成功时,
false
否则。