QtROClientFactory Class
Classe contenant des informations sur les backends clients disponibles sur le réseau Qt Remote Objects. En savoir plus...
| En-tête : | #include <QtROClientFactory> |
| CMake : | find_package(Qt6 REQUIRED COMPONENTS RemoteObjects) target_link_libraries(mytarget PRIVATE Qt6::RemoteObjects) |
| qmake : | QT += remoteobjects |
Personnes concernées non membres
| void | qRegisterRemoteObjectsClient(const QString &id) |
Personnes non membres associées
template <typename T> void qRegisterRemoteObjectsClient(const QString &id)
Enregistre le client « Remote Objects » 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 ` CustomClientIo ` en tant que ` "myprotocol"` :
qRegisterRemoteObjectsClient<CustomClientIo>(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 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.