Active Qt
Qt's ActiveX and COM support enables Qt for Windows developers to:
- Access and use ActiveX controls and COM objects provided by any ActiveX server in their Qt applications.
- Make their Qt applications available as COM servers, with any number of Qt objects and widgets as COM objects and ActiveX controls.
For more information about using ActiveX with Qt, see Building ActiveX servers in Qt.
The ActiveQt framework consists of two modules:
- The QAxContainer module is a static library that implements a QObject subclass, QAxObject, and a QWidget subclass, QAxWidget, which act as containers for COM objects and ActiveX controls.
- The QAxServer module is a static library that implements functionality for in-process and executable COM servers. This module provides the QAxAggregated, QAxBindable, and QAxFactory classes.
A set of tools is provided to simplify the developing and building of Qt projects that use ActiveX.
Using the Module
Using a Qt module's C++ API requires linking against the module library, either directly or through other dependencies. Several build tools have dedicated support for this, including CMake and qmake.
Building with CMake
Use the find_package()
command to locate the needed module components in the Qt6
package:
find_package(Qt6 REQUIRED COMPONENTS AxContainer AxServer) target_link_libraries(mytarget PRIVATE Qt6::AxContainer Qt6::AxServer)
For more details, see the Build with CMake overview.
Building with qmake
To configure the modules for building with qmake, add the module as a value of the QT
variable in the project's .pro file:
QT += axcontainer axserver
Articles and Guides
Examples
- Qutlook Example (ActiveQt)
- COM App Example (ActiveQt)
- Wrapper Example (ActiveQt)
- Simple Example (ActiveQt)
Reference
Licenses and Attributions
The QAxContainer and QAxServer modules are available under commercial licenses from The Qt Company. In addition, they are available under the BSD 3-clause "New" or "Revised" License.
See Qt Licensing for further details.
© 2024 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.