QtROServerFactory Class
Uma classe que contém informações sobre os back-ends de servidor disponíveis na rede Qt Remote Objects. Mais...
| Cabeçalho: | #include <QtROServerFactory> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS RemoteObjects) target_link_libraries(mytarget PRIVATE Qt6::RemoteObjects) |
| qmake: | QT += remoteobjects |
Relacionado a não membros
| void | qRegisterRemoteObjectsServer(const QString &id) |
Não-membros relacionados
template <typename T> void qRegisterRemoteObjectsServer(const QString &id)
Registra o servidor 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 ` CustomServerImpl ` como ` "myprotocol"`:
qRegisterRemoteObjectsServer<CustomServerImpl>(QStringLiteral("myprotocol"));Com isso configurado, agora você pode instanciar nós usando esse novo protocolo personalizado:
QRemoteObjectNode client(QUrl(QStringLiteral("myprotocol:registry")));Veja também ` 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.