Nesta página

QtROClientFactory Class

Uma classe que contém informações sobre os back-ends de clientes disponíveis na rede Qt Remote Objects. Mais...

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

Descrição detalhada

Não-membros relacionados

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

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

Se você precisar de um protocolo de transporte personalizado para Qt Remote Objects, será necessário registrar a implementação do cliente e do servidor aqui.

Observação: esta função requer que T seja um tipo totalmente definido no momento em que a função for chamada.

Este exemplo registra a classe ` CustomClientIo ` como ` "myprotocol"`:

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

Com isso feito, agora você pode instanciar nós usando esse novo protocolo personalizado:

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

Veja também ` 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.