- Qt 6.10
- Qt Qml
- QML Lint Warning and Errors
- Id quotation
- Qt 6.10.2 Reference Documentation

# Id quotation

This warning category is spelled `[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
     }