このページでは

IDの引用

この警告カテゴリは、qmllint によって「[syntax.id-quotation] 」と表記されます。

IDには引用符は必要ありません

何が起きたのですか?

IDを引用符で囲んでしまいました。

なぜ問題なのでしょうか?

これにより、IDと文字列の区別が曖昧になる恐れがあります。QML言語では、IDに引用符を付ける必要はなく、IDとしてより複雑な文字列式を使用することは禁止されています。

例

import QtQuick

Item {
    id: "root"
}

この警告を解消するには、引用符を削除してください:

import QtQuick

Item {
    id: root
}

© 2026 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.