qt_generate_dbus_interface
从头文件生成 D-Bus 接口。
该命令在Qt6
软件包的DBus
组件中定义。加载软件包:
find_package(Qt6 REQUIRED COMPONENTS DBus)
该命令在 Qt 6.0 中引入。
简介
qt_generate_dbus_interface(header [customName] [OPTIONS options] )
如果禁用了无版本命令,请使用qt6_generate_dbus_interface()
代替。它支持与此命令相同的参数集。
说明
解析包含QObject 衍生类声明的 C++ 源文件或头文件,并生成包含 D-Bus Introspection XML 的文件。
默认情况下,生成的 XML 文件存储在当前二进制目录下,其基本名称与头文件相同。您可以通过添加customName
作为可选的第二个参数,指定不同的名称或路径。
选项
该函数用于调用qdbuscpp2xml
命令行工具。可在OPTIONS
后设置该工具的其他参数。
© 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.