En esta página

QtROClientFactory Class

Clase que contiene información sobre los backends de cliente disponibles en la red Qt Remote Objects. Más...

Cabecera: #include <QtROClientFactory>
CMake: find_package(Qt6 REQUIRED COMPONENTS RemoteObjects)
target_link_libraries(mytarget PRIVATE Qt6::RemoteObjects)
qmake: QT += remoteobjects
void qRegisterRemoteObjectsClient(const QString &id)

Descripción detallada

No miembros relacionados

template <typename T> void qRegisterRemoteObjectsClient(const QString &id)

Registra el cliente de Objetos Remotos id para el tipo T.

Si necesitas un protocolo de transporte personalizado para Qt Remote Objects, necesitas registrar la implementación del cliente y servidor aquí.

Nota: Esta función requiere que T sea un tipo completamente definido en el punto donde la función es llamada.

Este ejemplo registra la clase CustomClientIo como "myprotocol":

qRegisterRemoteObjectsClient<CustomClientIo>(QStringLiteral("myprotocol"));

Una vez hecho esto, ya puedes instanciar nodos utilizando este nuevo protocolo personalizado:

QRemoteObjectNode client(QUrl(QStringLiteral("myprotocol:registry")));

Véase también qRegisterRemoteObjectsServer.

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