QtROServerFactory Class
Classe contenant des informations sur les serveurs backend disponibles sur le réseau Qt Remote Objects. En savoir plus...
| En-tête : | #include <QtROServerFactory> |
| CMake : | find_package(Qt6 REQUIRED COMPONENTS RemoteObjects) target_link_libraries(mytarget PRIVATE Qt6::RemoteObjects) |
| qmake : | QT += remoteobjects |
Connexes pour les non-membres
| void | qRegisterRemoteObjectsServer(const QString &id) |
Personnes non membres associées
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 ici les implémentations client et serveur.
Remarque : cette fonction nécessite 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"));Une fois cela fait, vous pouvez désormais instancier des nœuds à l'aide de ce nouveau protocole personnalisé :
QRemoteObjectNode client(QUrl(QStringLiteral("myprotocol:registry")));Voir également 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.