- Qt 6.11
- Qt Qml
- Qt Qml Tooling
- qmllint
- QML Lint Warning and Errors
- Id quotation
- Qt 6.11.2 Reference Documentation

Duplicate id ◦ Top level component

# 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
     }

Duplicate id ◦ Top level component