El tipo se instancia de forma recursiva
qmllint denomina esta categoría de advertencia « [type-instantiated-recursively] ».
El tipo no se puede instanciar de forma recursiva
¿Qué ha pasado?
Un componente se ha instanciado a sí mismo.
¿Por qué es un problema?
El componente se necesita a sí mismo para instanciarse, lo que crea un bucle infinito. El QML Runtime generará un error en este componente.
Ejemplo
// MyComponent.qml
import QtQuick
Item {
MyComponent {}
}Para solucionar esta advertencia,
- sustituye el componente problemático por otro si se trata de un error.
- Aplaza la instanciación para más adelante, por ejemplo, mediante la creación dinámica de objetos QML desde JavaScript.
© 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.