QtROServerFactory Class
Une classe qui contient des informations sur les serveurs disponibles sur le réseau Qt Remote Objects. Plus d'informations...
| En-tête : | #include <QtROServerFactory> |
| CMake : | find_package(Qt6 REQUIRED COMPONENTS RemoteObjects)target_link_libraries(mytarget PRIVATE Qt6::RemoteObjects) |
| qmake : | QT += remoteobjects |
Non-membres apparentés
| void | qRegisterRemoteObjectsServer(const QString &id) |
Non-membres apparentés
template <typename T> void qRegisterRemoteObjectsServer(const QString &id)
Enregistre le serveur d'objets distants id pour le type T.
Si vous avez besoin d'un protocole de transport personnalisé pour Qt Remote Objects, vous devez enregistrer l'implémentation du client et du serveur ici.
Remarque : cette fonction exige que T soit un type entièrement défini au moment où la fonction est appelée.
Cet exemple enregistre la classe CustomServerImpl en tant que "myprotocol":
qRegisterRemoteObjectsServer<CustomServerImpl>(QStringLiteral("myprotocol"));
Ceci étant fait, vous pouvez maintenant instancier des nœuds à l'aide de ce nouveau protocole personnalisé :
QRemoteObjectNode client(QUrl(QStringLiteral("myprotocol:registry")));
Voir aussi 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.