Host QML Type

Qt Remote Objects ネットワーク上のホストノード。詳細...

Import Statement: import QtRemoteObjects 6.8
In C++: QRemoteObjectHost

プロパティ

方法

詳細な説明

Host型は、Qt Remote Objects ネットワークへのエントリーポイントを提供する。ネットワークは、2つのノードのような単純なものから、任意に複雑なプロセスやデバイスの集合になることもあります。

ホストはノードと同じ機能を持つが、ネットワーク上のソース・オブジェクトに接続し、共有することもできる。

プロパティの説明

hostUrl : url

ノードのホスト・アドレス。

これは、このノードによってリモ ートされるソース・オブジェクトが存在するアドレスです。


メソッド・ドキュメント

bool disableRemoting(object remoteObject)

QObject remoteObject のリモート・アクセスを無効にします。現在のノードがクライアント・ノードである場合、またはremoteObject が登録されていない場合はfalse を返し、ソース・オブジェクトのリモートが正常に無効化された場合はtrue を返します。

警告: 警告: このメソッドを呼び出すと、このオブジェクトのレプリカは無効になります。

enableRemoting()も参照してください


bool enableRemoting(object object, string name)

ホスト・ノードがQObject object へのリモート・アクセスを動的に提供できるようにします。このオブジェクトをホストするノードに接続されたクライアント・ノードは、このソースのレプリカを取得できます。

オプションのname は、QRemoteObjectNode::acquire() を使用してQObject を取得できるルックアップ名を定義します。明示的に設定されていない場合は、QCLASSINFO_REMOTEOBJECT_TYPE で指定された名前が使用されます。そのようなマクロがQObject に対して定義されていない場合、QObject::objectName() が使用される。

現在のノードがクライアント・ノードである場合、またはQObject がすでにリモートに登録されている場合はfalse を返し、動的なQObject に対してリモートが正常に有効になっている場合はtrue を返します。

disableRemoting()も参照してください


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