QRemoteObjectPendingCall 类

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

头: #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)

详细描述

成员类型文档编制

enum QRemoteObjectPendingCall:: Error

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

常量 描述
QRemoteObjectPendingCall::NoError 0 没有出现错误。
QRemoteObjectPendingCall::InvalidMessage 1 远程调用完成前的默认错误状态。

成员函数文档编制

QRemoteObjectPendingCall::Error QRemoteObjectPendingCall:: error () const

返回错误,若有的话,从远程调用。

bool QRemoteObjectPendingCall:: isFinished () const

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

已完成调用将包括 returnValue or error .

QVariant QRemoteObjectPendingCall:: returnValue () const

返回远程调用的返回值。

returnValue will only be valid when the remote call has finished and there are no error

bool QRemoteObjectPendingCall:: waitForFinished ( int timeout = 30000)

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

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