lightstep
lightstep

Reputation: 805

Comments in Qt qrc file

How to add comments to Qt qrc file? I tried // and /* */, but this gives me an error "RCC Parse error ... [unexpected text]". Sample file:

<RCC>
<qresource>
    // images
    <file>image1.png</file>
    <file>image2.png</file>

    // qml documents
    <file>doc1.qml</file>
    <file>doc2.qml</file>
</qresource>
</RCC>

Upvotes: 9

Views: 3399

Answers (2)

Pavel Matrenin
Pavel Matrenin

Reputation: 181

A format of .qrc files is based on XML. Therefore you can use XML-style for comments:

    Comment    ::=      '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'

An example of a comment:

<!-- declarations for <head> & <body> -->

XML spec

Upvotes: 13

Amol Saindane
Amol Saindane

Reputation: 1598

You can use <!-- --> e.g.

<!-- this is my comment in qrc file -->

Upvotes: 5

Related Questions