如何在Qt qrc文件中添加注释?
我尝试了//和/* */,但这给了我一个错误“RCC Parse error ... [unexpected text]”。
样本文件:
<RCC>
<qresource>
// images
<file>image1.png</file>
<file>image2.png</file>
// qml documents
<file>doc1.qml</file>
<file>doc2.qml</file>
</qresource>
</RCC>
最佳答案
.qrc文件的格式基于XML。因此,您可以使用XML样式进行注释:
Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'
评论示例:
<!-- declarations for <head> & <body> -->
XML spec
关于qt - Qt qrc文件中的注释,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31114374/