QtROClientFactory Class

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

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

詳細説明

関連する非会員

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

T 型のリモートオブジェクトクライアントid を登録する。

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

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

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

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