QRemoteObjectDynamicReplica Class
ヘッダ | #include <QRemoteObjectDynamicReplica> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS RemoteObjects) target_link_libraries(mytarget PRIVATE Qt6::RemoteObjects) |
qmake: | QT += remoteobjects |
継承: | QRemoteObjectReplica |
パブリック関数
virtual | ~QRemoteObjectDynamicReplica() override |
詳細な説明
レプリカには、生成されたレプリカ(レプリカコンパイラが生成したヘッダファイルを持つレプリカ)と、その場で生成される動的レプリカがあります。これは動的レプリカのクラスです。
ソース・オブジェクトへの接続が作成されると、初期化ステップで現在のプロパティ値が渡されます (レプリカの初期化を参照)。DynamicReplicaでは、プロパティ/シグナル/スロットの詳細も送信され、レプリカ・オブジェクトをオンザフライで作成できます。これはQMLやスクリプトでは便利ですが、主に2つの欠点があります。第一に、オブジェクトはソースによって初期化されるまで、事実上 "空 "です。第二に、C++では、mocが生成したルックアップが利用できないため、QMetaObject::invokeMethod ()を使って呼び出さなければなりません。
このクラスにはパブリック・コンストラクタはありません。動的なQRemoteObjectNode::acquire メソッドを使用してのみインスタンス化できます。
メンバ関数のドキュメント
[override virtual noexcept]
QRemoteObjectDynamicReplica::~QRemoteObjectDynamicReplica()
ダイナミック・レプリカを破棄します。
レプリカの所有権も参照してください 。
© 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.