QtROClientFactory Class | Qt Remote Objects 5.12.9

- Qt 5.12
- Qt Remote Objects
- C++ Classes
- QtROClientFactory
- Qt 5.12.9 Reference Documentation

# QtROClientFactory Class

A class holding information about client backends available on the Qt Remote Objects network. More...

Header: | #include <QtROClientFactory>
qmake: | QT += remoteobjects

- List of all members, including inherited members

## Public Functions

ClientIoDevice * | create(const QUrl &url, QObject *parent = nullptr)
bool | isValid(const QUrl &url)
void | registerType(const QString &id)

## Static Public Members

QtROClientFactory * | instance()

## Related Non-Members

void | qRegisterRemoteObjectsClient(const QString &id)

## Detailed Description

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

## Member Function Documentation

### ClientIoDevice *QtROClientFactory::create(const QUrl &url, QObject *parent = nullptr)

### `[static]` QtROClientFactory *QtROClientFactory::instance()

### bool QtROClientFactory::isValid(const QUrl &url)

### void QtROClientFactory::registerType(const QString &id)

## 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.

Note: 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"`:

     qRegisterRemoteObjectsClient<CustomClientIo>(QStringLiteral("myprotocol"));

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

     QRemoteObjectNode client(QUrl(QStringLiteral("myprotocol:registry")));

See also qRegisterRemoteObjectsServer.