Le type est instancié de manière récursive
Cette catégorie d'avertissement est orthographiée « [type-instantiated-recursively] » par qmllint.
Le type ne peut pas être instancié de manière récursive
Que s'est-il passé ?
Un composant s'est instancié lui-même.
Pourquoi est-ce un problème ?
Le composant a besoin de lui-même pour s’instancier, ce qui crée une boucle infinie. Le QML Runtime générera une erreur sur ce composant.
Exemple
// MyComponent.qml
import QtQuick
Item {
MyComponent {}
}Pour corriger cet avertissement,
- Remplacez le composant problématique par un autre s'il s'agit d'une erreur.
- Reportez l'instanciation à plus tard, en utilisant par exemple la création dynamique d'objets QML à partir de 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.