Alias sin resolver
Esta categoría de advertencia se escribe [unresolved-alias] por qmllint.
Alias sin resolver
¿Qué ha ocurrido?
Un alias de propiedad debe contener una referencia a otra propiedad, ver también Atributos de Objeto QML - Alias de Propiedad. En este caso, contiene una referencia a una propiedad que no se ha encontrado.
¿Por qué es malo?
Las instancias de componentes con alias no resueltos no se crearán en tiempo de ejecución: en su lugar serán nulas.
Ejemplo
import QtQuick Item { id: someId property int helloWorld property alias helloWorldAlias: helloWorld // not ok: aliases have to refer by id property alias helloWorldAlias2: someId.helloWorlddd // not ok: no helloWorlddd in someId property alias helloWorldAlias3: someIddd.helloWorld // not ok: someIddd does not exist }
Para solucionar esta advertencia, asegúrese de que el id y la propiedad del alias existen realmente:
import QtQuick Item { id: someId property int helloWorld property alias helloWorldAlias: someId.helloWorld // ok: alias refers by id property alias helloWorldAlias2: someId.helloWorld // ok: helloWorld does exist in someId property alias helloWorldAlias3: someId.helloWorld // ok: someId does exist }
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.