Nesta página

QRemoteObjectPendingCall Class

Encapsula o resultado de uma chamada assíncrona a um método. Mais...

Cabeçalho: #include <QRemoteObjectPendingCall>
CMake: find_package(Qt6 REQUIRED COMPONENTS RemoteObjects)
target_link_libraries(mytarget PRIVATE Qt6::RemoteObjects)
qmake: QT += remoteobjects
Herdado por:

QRemoteObjectPendingCallWatcher e QRemoteObjectPendingReply

Tipos públicos

enum Error { NoError, InvalidMessage }

Funções públicas

QRemoteObjectPendingCall::Error error() const
bool isFinished() const
QVariant returnValue() const
bool waitForFinished(int timeout = 30000)

Descrição detalhada

Documentação do tipo de membro

enum QRemoteObjectPendingCall::Error

Este tipo de enumeração especifica os valores de erro possíveis para uma chamada remota:

ConstanteValorDescrição
QRemoteObjectPendingCall::NoError0Não ocorreu nenhum erro.
QRemoteObjectPendingCall::InvalidMessage1O estado de erro padrão antes da conclusão da chamada remota.

Documentação da função membro

QRemoteObjectPendingCall::Error QRemoteObjectPendingCall::error() const

Retorna o erro, se houver, da chamada remota.

bool QRemoteObjectPendingCall::isFinished() const

Retorna true se a chamada remota tiver sido concluída; caso contrário, retorna false.

Uma chamada concluída incluirá um ` returnValue ` ou um ` error`.

QVariant QRemoteObjectPendingCall::returnValue() const

Retorna o valor de retorno da chamada remota.

returnValue só será válido quando a chamada remota tiver sido concluída e não houver nenhum ` error`.

bool QRemoteObjectPendingCall::waitForFinished(int timeout = 30000)

Bloqueia por até timeout milissegundos, até que a chamada remota seja concluída.

Retorna ` true ` em caso de sucesso e ` false ` caso contrário.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.