QRemoteObjectDynamicReplica Class
Header: | #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이나 스크립팅에서 편리할 수 있지만 두 가지 주요 단점이 있습니다. 첫째, 소스에 의해 성공적으로 초기화될 때까지 오브젝트는 사실상 '비어 있는' 상태입니다. 둘째, 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.