1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
5\page qmllint-warnings-and-errors-unresolved-alias.html
6\ingroup qmllint-warnings-and-errors
9\brief Property of property alias was not found.
11\section1 Unresolved Alias
13\section2 What happened?
14A property alias should hold a reference to another property, see also
15\l{QML Object Attributes#property-aliases}{QML Object Attributes - Property Aliases}.
16In this case, it holds a reference to a property that was not found.
18\section2 Why is this bad?
19Instances of components with unresolved alias will not be created at runtime:
20they will be null instead.
28 property int helloWorld
30 property alias helloWorldAlias: helloWorld // not ok: aliases have to refer by id
31 property alias helloWorldAlias2: someId.helloWorlddd // not ok: no helloWorlddd in someId
32 property alias helloWorldAlias3: someIddd.helloWorld // not ok: someIddd does not exist
36You can fix this warning by making sure that the id and the properties of the alias property
43 property int helloWorld
45 property alias helloWorldAlias: someId.helloWorld // ok: alias refers by id
46 property alias helloWorldAlias2: someId.helloWorld // ok: helloWorld does exist in someId
47 property alias helloWorldAlias3: someId.helloWorld // ok: someId does exist