QAxSelect Class
QAxSelect 类为已注册的 COM 组件提供了一个选择对话框。更多内容...
| 标题: | #include <qaxselect.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS AxContainer) target_link_libraries(mytarget PRIVATE Qt6::AxContainer) |
| qmake: | QT += axcontainer |
| 继承自: | QDialog |
公共类型
| enum | SandboxingLevel { SandboxingNone, SandboxingProcess, SandboxingLowIntegrity, SandboxingAppContainer } |
公共函数
| QAxSelect(QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags()) | |
| virtual | ~QAxSelect() override |
| QString | clsid() const |
| QAxSelect::SandboxingLevel | sandboxingLevel() const |
详细说明
QAxSelect 对话框可用于让用户浏览系统中已注册的 COM 组件并选择其中一个。它还提供了一个下拉列表框,用于选择所需的沙箱级别。随后,应用程序中可以使用所选组件的 CLSID 来初始化QAxWidget 等:
另请参阅 QAxWidget 和ActiveQt框架。
成员类型文档
enum QAxSelect::SandboxingLevel
SandboxingLevel 枚举定义了所需的 ActiveX 沙箱级别。
| 常量 | 值 | 描述 |
|---|---|---|
QAxSelect::SandboxingNone | 0 | 不希望进行特定的沙箱处理 |
QAxSelect::SandboxingProcess | 1 | 在单独的进程中运行 ActiveX 控件 |
QAxSelect::SandboxingLowIntegrity | 2 | 在单独的低完整性进程中运行 ActiveX 控件 |
QAxSelect::SandboxingAppContainer (since Qt 6.5) | 3 | 在单独的、由 AppContainer 隔离的进程中运行 ActiveX 控件 |
沙箱化要求 ActiveX 控件必须构建为 EXE 文件,或者构建为启用了 AppID“DllSurrogate”的 DLL 文件。
成员函数文档
[explicit] QAxSelect::QAxSelect(QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags())
创建一个 QAxSelect 对象。可通过参数 `parent ` 和 `flags ` 分别可选地指定对话框的父控件和窗口标志。
[override virtual noexcept] QAxSelect::~QAxSelect()
销毁QAxSelect 对象。
QString QAxSelect::clsid() const
返回所选 COM 组件的 CLSID。
QAxSelect::SandboxingLevel QAxSelect::sandboxingLevel() const
返回 ActiveX 控件所需的沙箱级别。
© 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.