封装异步方法调用的结果。 更多...
头: | #include <QRemoteObjectPendingCall> |
CMake: |
find_package(Qt6 COMPONENTS RemoteObjects REQUIRED)
target_link_libraries(mytarget PRIVATE Qt6::RemoteObjects) |
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) |
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. |
返回错误,若有的话,从远程调用。
Returns true if the remote call has finished, false otherwise.
A finished call will include a returnValue or error .
Returns the return value of the remote call.
returnValue will only be valid when the remote call has finished and there are no error 。
阻塞最多 timeout milliseconds, until the remote call has finished.
返回
true
当成功时,
false
否则。