En esta página

QtROServerFactory Class

Clase que contiene información sobre los servidores backend disponibles en la red Qt Remote Objects. Más...

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

Descripción detallada

No miembros relacionados

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

Registra el servidor 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 se llama a la función.

Este ejemplo registra la clase CustomServerImpl como "myprotocol":

qRegisterRemoteObjectsServer<CustomServerImpl>(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 qRegisterRemoteObjectsClient.

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