Sur cette page

QRemoteObjectPendingCall Class

Encapsule le résultat d'un appel de méthode asynchrone. En savoir plus...

En-tête : #include <QRemoteObjectPendingCall>
CMake : find_package(Qt6 REQUIRED COMPONENTS RemoteObjects)
target_link_libraries(mytarget PRIVATE Qt6::RemoteObjects)
qmake : QT += remoteobjects
Hérité par :

QRemoteObjectPendingCallWatcher et QRemoteObjectPendingReply

Types publics

enum Error { NoError, InvalidMessage }

Fonctions publiques

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

Description détaillée

Documentation sur les types de membres

enum QRemoteObjectPendingCall::Error

Ce type d'énumération spécifie les valeurs d'erreur possibles pour un appel à distance :

ConstanteValeurDescription
QRemoteObjectPendingCall::NoError0Aucune erreur ne s'est produite.
QRemoteObjectPendingCall::InvalidMessage1État d'erreur par défaut avant la fin de l'appel à distance.

Documentation des fonctions membres

QRemoteObjectPendingCall::Error QRemoteObjectPendingCall::error() const

Renvoie l'erreur, le cas échéant, issue de l'appel distant.

bool QRemoteObjectPendingCall::isFinished() const

Renvoie « true » si l'appel à distance est terminé, « false » dans le cas contraire.

Un appel terminé inclura un returnValue ou un error.

QVariant QRemoteObjectPendingCall::returnValue() const

Renvoie la valeur de retour de l'appel distant.

returnValue ne sera valide que lorsque l'appel distant sera terminé et qu'il n'y aura pas d'errors.

bool QRemoteObjectPendingCall::waitForFinished(int timeout = 30000)

Bloque pendant timeout millisecondes au maximum, jusqu’à ce que l’appel distant soit terminé.

Renvoie ` true ` en cas de succès, ` false ` dans le cas contraire.

© 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.