testcon - ActiveX 测试容器(ActiveQt)
该应用程序为 ActiveX 控件实现了一个通用的测试容器。您可以插入安装在系统中的 ActiveX 控件,并执行方法和修改属性。容器将记录有关事件和属性更改的信息,并在日志窗口中提供调试输出。
部分代码使用了 Qt 元对象和 ActiveQt 框架的内部结构,不建议在应用程序代码中使用。
使用该程序可查看QAxWidget 类在与某个 ActiveX 实例化时可用的插槽、信号和属性,还可测试您实现的或想在 Qt 应用程序中使用的 ActiveX 控件。
应用程序可以加载和执行 JavaScript、VBScript、Perl 和 Python(如果已安装)脚本文件,以自动加载控件。scripts
子目录中提供了使用 QAxWidget2 类的示例脚本文件。
请注意,此示例的 qmake 项目包括一个资源文件testcon.rc
,其中包含一个版本资源。某些 ActiveX 控件(如 Shockwave ActiveX 控件)需要使用该资源,如果缺少该版本信息,这些控件可能会崩溃或出现其他错误行为。
要编译该工具,必须首先编译QAxContainer 和QAxServer 库。然后运行tools/testcon
中的 make 工具,并运行生成的testcon.exe
。
© 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.