Id quotation

This warning category is spelled c{[syntax.id-quotation]} by qmllint.

Ids do not need quotation marks

What happened?

You surrounded an id with quotation marks.

Why is this bad?

This might lead to confusion between ids and strings. The QML language does not require quotation marks for ids and forbids more complex string expressions for ids.

Example

import QtQuick

Item {
    id: "root"
}

To fix this warning, remove the quotation marks:

import QtQuick

Item {
    id: root
}

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