Sur cette page

QtROClientFactory Class

Une classe qui contient des informations sur les backends clients disponibles sur le réseau Qt Remote Objects. Plus d'informations...

En-tête : #include <QtROClientFactory>
CMake : find_package(Qt6 REQUIRED COMPONENTS RemoteObjects)
target_link_libraries(mytarget PRIVATE Qt6::RemoteObjects)
qmake : QT += remoteobjects
void qRegisterRemoteObjectsClient(const QString &id)

Description détaillée

Non-membres apparentés

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

Enregistre le client 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 CustomClientIo en tant que "myprotocol":

qRegisterRemoteObjectsClient<CustomClientIo>(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 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.