Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/qt/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Qt 如何在qdbusxml2cpp自动生成的绑定代码中添加头?_Qt_Qtdbus_Qdbusxml2cpp - Fatal编程技术网

Qt 如何在qdbusxml2cpp自动生成的绑定代码中添加头?

Qt 如何在qdbusxml2cpp自动生成的绑定代码中添加头?,qt,qtdbus,qdbusxml2cpp,Qt,Qtdbus,Qdbusxml2cpp,$qdbusxml2cpp-v-c CustomIf-p CustomIf.h:CustomIf.cpp org.item.custom.xml <node> <interface name="org.pace.custom"> <method name="Send_Custom_Msg"> <arg name="msg" type="a(ii)" direction="in"/> <annotation name="org.qtprojec

$qdbusxml2cpp-v-c CustomIf-p CustomIf.h:CustomIf.cpp org.item.custom.xml

<node>
<interface name="org.pace.custom">
<method name="Send_Custom_Msg">
<arg name="msg" type="a(ii)" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="Message"/>
</method>
<signal name="LateEvent">
<arg name="eventkind" type="s" direction="out"/>
</signal>
</interface>
</node>
org.item.custom.xml

<node>
<interface name="org.pace.custom">
<method name="Send_Custom_Msg">
<arg name="msg" type="a(ii)" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="Message"/>
</method>
<signal name="LateEvent">
<arg name="eventkind" type="s" direction="out"/>
</signal>
</interface>
</node>


如何在生成的适配器customif.h中添加header-message.h?我不想手动将其添加为#include“message.h”,但实际上希望qdbusxml2cpp添加该包含项。

使用以下选项:

-i <filename> Add #include to the output

$qdbusxml2cpp-c CustomIfAdaptor-a-i CustomIfAdaptor.h:CustomIfAdaptor.cpp org.pace.custom.xml在此命令中,添加message.h的位置