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

This enum type specifies the possible error values for a remote call:

常量 描述
QRemoteObjectPendingCall::NoError 0 没有出现错误。
QRemoteObjectPendingCall::InvalidMessage 1 The default error state prior to the remote call finishing.

成员函数文档编制

QRemoteObjectPendingCall::Error QRemoteObjectPendingCall:: error () const

Returns the error, if any, from the remote call.

bool QRemoteObjectPendingCall:: isFinished () const

Returns true if the remote call has finished, false otherwise.

A finished call will include a returnValue or error .

QVariant QRemoteObjectPendingCall:: returnValue () const

Returns the return value of the remote call.

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

bool QRemoteObjectPendingCall:: waitForFinished ( int timeout = 30000)

Blocks for up to timeout milliseconds, until the remote call has finished.

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