Cannot access singleton as a property of an object¶
[access-singleton-via-object] A singleton was incorrectly accessed.
This warning category is spelled [access-singleton-via-object] by qmllint.
Access singleton via object¶
What happened?¶
You accessed a singleton using the syntax for accessing attached properties from a namespace.
Why is this bad?¶
Singletons can’t be accessed in this way. The expression will evaluate to undefined.
Example¶
To fix this warning, remove the id or property in front of the namespace if you intended to use the singleton. Alternatively, check for typos if you wanted to access an attached property.