QAxObject Class
QAxObject 클래스는 COM 개체를 래핑하는 QObject 을 제공합니다. 더 보기...
헤더: | #include <QAxObject> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS AxContainer) target_link_libraries(mytarget PRIVATE Qt6::AxContainer) |
qmake: | QT += axcontainer |
상속합니다: | QAxBaseObject 및 QAxBase |
상속받은 사람: |
공용 함수
QAxObject(QObject *parent = nullptr) | |
QAxObject(IUnknown *iface, QObject *parent = nullptr) | |
QAxObject(const QString &c, QObject *parent = nullptr) | |
virtual | ~QAxObject() override |
bool | doVerb(const QString &verb) |
재구현된 보호 함수
virtual void | connectNotify(const QMetaMethod &signal) override |
상세 설명
QAxObject는 빈 객체로 인스턴스화하거나, 래핑해야 하는 COM 객체의 이름 또는 기존 COM 객체를 나타내는 IUnknown에 대한 포인터를 사용하여 인스턴스화할 수 있습니다. COM 객체가 IDispatch
인터페이스를 구현하면 해당 객체의 속성, 메서드 및 이벤트는 Qt 속성, 슬롯 및 시그널로 사용할 수 있게 됩니다. 기본 클래스인 QAxBase 는 IUnknown 포인터를 통해 COM 객체에 직접 액세스하는 API를 제공합니다.
QAxObject는 QObject 와 같이 사용할 수 있으며, 예를 들어 객체 계층 구조로 구성하고 이벤트를 수신하고 신호 및 슬롯에 연결할 수 있습니다.
또한 QAxObject는 QAxBase, 특히 dynamicCall() 및 querySubObject()에서 대부분의 ActiveX 관련 기능을 상속받습니다.
QAxBase, QAxWidget, QAxScript, ActiveQt 프레임워크도참조하세요 .
멤버 함수 문서
[explicit]
QAxObject::QAxObject(QObject *parent = nullptr)
빈 COM 객체를 생성하고 QObject 생성자에 parent 을 전파합니다. 객체를 초기화하려면 setControl()을 호출합니다.
setControl()도 참조하세요 .
[explicit]
QAxObject::QAxObject(IUnknown *iface, QObject *parent = nullptr)
iface 에서 참조하는 COM 객체를 래핑하는 QAxObject를 생성합니다. parent 은 QObject 생성자에 전파됩니다.
[explicit]
QAxObject::QAxObject(const QString &c, QObject *parent = nullptr)
COM 객체를 래핑하는 QAxObject를 생성합니다 c. parent 은 QObject 생성자에 전파됩니다.
setControl()도 참조하세요 .
[override virtual noexcept]
QAxObject::~QAxObject()
COM 개체를 해제하고 QAxObject 을 삭제하여 할당된 모든 리소스를 정리합니다.
[override virtual protected]
void QAxObject::connectNotify(const QMetaMethod &signal)
재구현합니다: QObject::connectNotify(const QMetaMethod &signal).
bool QAxObject::doVerb(const QString &verb)
COM 객체에 작업을 수행하도록 요청합니다 verb. 가능한 동사는 verbs()로 반환됩니다.
이 함수는 객체가 작업을 수행할 수 있으면 참을 반환하고, 그렇지 않으면 거짓을 반환합니다.
© 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.