QML Lint Warning and Errors | Qt Qml | Qt 6.12.0

- Qt 6.12
- Qt Qml
- Qt Qml Tooling
- qmllint
- QML Lint Warning and Errors
- Qt 6.12.0 Reference Documentation

qmllint ◦ Cannot access singleton as a property of an object

# QML Lint Warning and Errors

Here is an overview over all QML Lint warning and error messages.

Alias cycle | [alias-cycle] Alias property is part of an alias cycle.
Attached property reuse | [attached-property-reuse] Attached type was initialized multiple times.
Block scope var declaration | [var-used-in-block-scope] A variable has been declared with var inside a block scope
Cannot access singleton as a property of an object | [access-singleton-via-object] A singleton was incorrectly accessed.
Comma | [comma] Do not use comma expressions.
Component is missing a required property | [required] A component's required property was not bound.
Components must have exactly one child | [component-children-count] A component has the wrong number of children.
Confusing expression statement | [confusing-expression-statement] Confusing expression statements.
Confusing minuses | [confusing-minuses] Confusing minuses.
Confusing pluses | [confusing-pluses] Confusing pluses.
Context properties | [context-properties] A context property was used.
Deprecated | [deprecated] A deprecated property or type was used.
Do not use void in expressions | [void] A void expression was used.
Duplicate Imports | [duplicate-import] Duplicate import.
Duplicate bindings | [duplicate-property-binding] A property was bound multiple times.
Duplicate enum entries | [duplicate-enum-entries] Enum key X has already been declared.
Duplicate id | [syntax.duplicate-ids] An id is not unique.
Duplicate inline components | [duplicate-inline-components] Duplicate inline component.
Duplicated name | [duplicated-name] Multiple members share the same name in the same component.
Enum declared outside the root element | [non-root-enum] An enum was declared outside the root element.
Enum entry matches enum | [enum-entry-matches-enum] Enum entry should be named differently than the enum itself.
Enum key case | [enum-key-case] Enum key starts with a lowercase letter
Enums are not types | [enums-are-not-types] Enum names used as type annotations.
Eval | [eval] Usage of eval.
Function used before its declaration | [function-used-before-declaration] A function was used before its declaration.
Id quotation | [syntax.id-quotation] Id has quotation marks.
Id shadows member | [id-shadows-member] An id shadows a member.
Import file selector | [import-file-selector] Imports using file selectors.
Incompatible type | [incompatible-type] An object, value, or expression is used on an incompatible type.
Inheritance cycle | [inheritance-cycle] A component inherits from itself.
Inline component enums | [inline-component-enums] An enum was declared inside an inline component.
Invalid qmllint directives | [invalid-lint-directive] Invalid qmllint comments.
Literal constructor | [literal-constructor] Do not use function as a constructor.
Loose equality comparison type coercion | [equality-type-coercion] Using loose equality comparison operators may coerce values.
Missing enum entry | [missing-enum-entry] Enum value is missing from its declaration.
Missing property | [missing-property] Binding a value to a non-existing property.
Missing type | [missing-type] A type used in a binding or alias was not found.
Multiline strings | [multiline-strings] A string is spanning over multiple lines.
Non-list property | [non-list-property] Multiple values were assigned to a non-list property.
Prefer non-var properties | [prefer-non-var-properties] Prefer non-var properties over var properties.
Property override | [property-override] Wrong usage of override, final, and virtual keywords.
Quick: Attached property type | [Quick.attached-property-type] Misuses of the Quick attached property types.
Readonly property | [read-only-property] A readonly property was written.
Recursion depths errors | [recursion-depth-errors] Qml statement or expression is too deeply nested.
Redundant Optional Chaining | [redundant-optional-chaining] Some optional chaining lookups could be non-optional
Renamed Type | [renamed-type] A type was called by its unexported name.
Restricted type | [restricted-type] A restricted type was accessed.
Shadow | [shadow] A member shadows another member.
Signal handler parameters | [signal-handler-parameters] The signal handler does not satisfy the signal types.
Stale property read | [stale-property-read] Reading non-constant and non-notifiable property.
Syntax | [syntax] Various syntactic errors.
Top level component | [top-level-component] Root QML type is a component
Type is instantiated recursively | [type-instantiated-recursively] Type instantiates itself.
Uncreatable type | [uncreatable-type] Types that can't be created.
Unintentional empty block | [unintentional-empty-block] An empty block was created, likely in place of an object literal.
Unqualified | [unqualified] Accessing an outer scope without its id.
Unreachable code | [unreachable-code] Some instructions are unreachable.
Unresolved alias | [unresolved-alias] Property of property alias was not found.
Unresolved type | [unresolved-type] A used type was not found.
Unterminated non-empty case block | [unterminated-case] A non-empty case block was not terminated.
Unused imports | [unused-imports] Types of the imported module were not used.
Use proper function | [use-proper-function] Calling something that might not be a function.
Var used before declaration | [var-used-before-declaration] A JavaScript variable was used before its declaration.
Warn about using assignment in conditions | [assignment-in-condition] An assignment statement is used inside a condition
Warnings occurred while importing | [import] The imported module was not found.
With | [with] With statements are strongly discouraged in QML.

qmllint ◦ Cannot access singleton as a property of an object