This warning category is spelled [alias-cycle] by qmllint.
A property alias resolves to itself or to another alias resolving to itself.
Usually, a property alias should reference another property either directly, or indirectly by passing through another alias property.
If a property alias directly or indirectly references itself, then it forms an alias cycle. The warning indicates that the current alias property is inside or references an alias cycle, see Example.
Instances of components with alias cycles will not be created at runtime: they will be null instead.
import QtQuick Item { id: someId property alias myself: someId.myself // not ok: referring to itself property alias cycle: someId.cycle2 // not ok: indirectly referring to itself property alias cycle2: someId.cycle property alias indirect: someId.cycle // not ok: referring to alias indirectly referring to itself }
To fix this warning, break up the alias cycles:
import QtQuick Item { id: someId Item { id: anotherId property string myself property int cycle } property alias myself: anotherId.myself // ok: referring to a property property alias cycle: someId.cycle2 // ok: does not refer to itself anymore property alias cycle2: anotherId.cycle // ok: not a cycle anymore property alias indirect: someId.cycle // ok: cycle does not form an alias cycle anymore }
As part of the free Business evaluation, we offer a free welcome call for companies, to talk about your requirements, and how the Felgo SDK & Services can help you. Just sign up and schedule your call.
Sign up now to start your free Business evaluation: