Active Qt

Qt's ActiveX and COM support enables Qt for Windows developers to:

  • 在 Qt 應用程序中訪問和使用由任何 ActiveX 服務器提供的 ActiveX 控件和 COM 對象。
  • 使 Qt 應用程序可用作 COM 服務器,采用任意數量 Qt 對象和小部件作為 COM 對象和 ActiveX 控件。

有關 Qt 使用 ActiveX 的更多信息,見 在 Qt 中構建 ActiveX 服務器 .

The ActiveQt framework consists of two modules:

一組 tools 的提供,是為簡化使用 ActiveX 的 Qt 工程的開發和構建。

使用模塊

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 .

構建采用 CMake

使用 find_package() 命令定位所需模塊組件在 Qt6 包:

find_package(Qt6 REQUIRED COMPONENTS AxContainer AxServer)
target_link_libraries(mytarget PRIVATE Qt6::AxContainer Qt6::AxServer)
					

更多細節,見 構建采用 CMake 概述。

采用 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
					

文章和指南

範例

參考

許可和歸屬

The QAxContainer and QAxServer 模塊在商業許可下是可用的來自 Qt 公司 。此外,它們是可用的在 BSD 3 條款新 (或修訂) 許可 :

Qt 許可 進一步瞭解細節。