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 |
상세 설명
생성된 리플리카( 리플리카 컴파일러에 의해 생성된 헤더 파일을 가진 리플리카)와, 실행 시점에 동적으로 생성되는 동적 리플리카가 있습니다. 이 클래스는 동적 유형의 리플리카를 위한 것입니다.
Source 객체와의 연결이 수립되면, 초기화 단계에서 현재 속성 값이 전달됩니다( ‘리플리카 초기화’ 참조). DynamicReplica의 경우 속성/신호/슬롯 정보도 함께 전송되므로, 리플리카 객체를 즉석에서 생성할 수 있습니다. 이는 QML이나 스크립팅에서 편리할 수 있지만, 두 가지 주요 단점이 있습니다. 첫째, 소스( Source)에 의해 성공적으로 초기화될 때까지 객체는 사실상 “비어” 있습니다. 둘째, C++에서는 moc으로 생성된 조회 기능이 사용할 수 없으므로 QMetaObject::invokeMethod()을 사용하여 호출해야 합니다.
이 클래스에는 공용 생성자가 없습니다. dynamic QRemoteObjectNode::acquire 메서드를 사용해야만 인스턴스를 생성할 수 있습니다.
멤버 함수 설명
[override virtual noexcept] QRemoteObjectDynamicReplica::~QRemoteObjectDynamicReplica()
동적 복제본을 삭제합니다.
‘복제본 소유권’항목도 참조하십시오 .
© 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.