QtROServerFactory Class

Qt Remote Objects ネットワーク上で利用可能なサーバーバックエンドに関する情報を保持するクラス。詳細...

ヘッダ #include <QtROServerFactory>
CMake: find_package(Qt6 REQUIRED COMPONENTS RemoteObjects)
target_link_libraries(mytarget PRIVATE Qt6::RemoteObjects)
qmake QT += remoteobjects
void qRegisterRemoteObjectsServer(const QString &id)

詳細説明

関連する非会員

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

T 型のリモートオブジェクトサーバーid を登録する。

Qt Remote Objects にカスタムトランスポートプロトコルが必要な場合は、ここでクライアントとサーバーの実装を登録する必要があります。

注意: この関数は、関数が呼び出された時点でT が完全に定義された型である必要があります。

この例では、クラスCustomServerImpl"myprotocol" として登録しています:

qRegisterRemoteObjectsServer<CustomServerImpl>(QStringLiteral("myprotocol"));

これで、この新しいカスタム・プロトコルを使用してノードをインスタンス化できるようになります:

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

qRegisterRemoteObjectsServerも参照してください

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