qt - Qt qrc文件中的注释

标签 qt resources

如何在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/

相关文章:

c++ - 黑莓 10 : GNU STL

c++ - 子类化 QCompleter,我的子类中的虚拟插槽未被调用

spring - spring中找不到css、图片、js静态文件

ASP.NET 在运行时创建资源

silverlight - 在后面的代码中设置隐式样式

python - 引用错误 : "something" is not defined in QML

qt - QWebView : Flash/Youtube videos not working

qt - 如何将项目添加到布局中的特定索引

有效的连接资源管理算法

c# - 单击按钮本地化应用程序