IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QtROClientFactory Class

A class that holds information about client backends available on the Qt Remote Objects network.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QtROClientFactory Class

  • Header: QtROClientFactory

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS RemoteObjects)

    target_link_libraries(mytarget PRIVATE Qt6::RemoteObjects)

  • qmake: QT += remoteobjects

Detailed Description

 

Related Non-Members

 

void qRegisterRemoteObjectsClient(const QString &id)

Registers the Remote Objects client id for the type T.

If you need a custom transport protocol for Qt Remote Objects, you need to register the client & server implementation here.

This function requires that T is a fully defined type at the point where the function is called.

This example registers the class CustomClientIo as "myprotocol":

 
Sélectionnez
qRegisterRemoteObjectsClient<CustomClientIo>(QStringLiteral("myprotocol"));

With this in place, you can now instantiate nodes using this new custom protocol:

 
Sélectionnez
QRemoteObjectNode client(QUrl(QStringLiteral("myprotocol:registry")));
See Also

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+