このページでは

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」も参照してください 。

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