Qt D-Bus XML 编译器 (qdbusxml2cpp)

Qt D-Bus XML 编译器是一款工具,可用于解析接口描述并生成代表这些接口的静态代码,这些代码随后可用于调用远程对象或实现所述接口。

qdbusxml2cpp 该工具具有两种工作模式,分别对应其可能生成的两种输出:接口(代理)类或适配器类。后者包含一个 C++ 头文件和一个源文件,供您根据需要进行编辑和调整。

qdbusxml2cpp 工具并非旨在每次编译应用程序时都运行,而应仅在开发代码或接口发生变更时使用。

qdbusxml2cpp 生成的适配器类仅为一个需要填补的框架。默认情况下,它会生成对适配器所附加对象上同名槽的调用。不过,您可以根据需要修改这些槽或属性访问函数。

© 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.