QtROServerFactory Class

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

Header: #include <QtROServerFactory>
qmake: QT += remoteobjects

Public Functions

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

Static Public Members

QtROServerFactory *instance()
void qRegisterRemoteObjectsServer(const QString &id)

Detailed Description

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

Member Function Documentation

QConnectionAbstractServer *QtROServerFactory::create(const QUrl &url, QObject *parent = nullptr)

[static] QtROServerFactory *QtROServerFactory::instance()

bool QtROServerFactory::isValid(const QUrl &url)

void QtROServerFactory::registerType(const QString &id)

Related Non-Members

void qRegisterRemoteObjectsServer(const QString &id)

Registers the Remote Objects server 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 CustomServerImpl as "myprotocol":

qRegisterRemoteObjectsServer<CustomServerImpl>(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.

© 2019 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.