wird der Typ rekursiv instanziiert
Diese Warnungskategorie wird von qmllint als „ [type-instantiated-recursively] “ bezeichnet.
Der Typ kann nicht rekursiv instanziiert werden
Was ist passiert?
Eine Komponente hat sich selbst instanziiert.
Warum ist das ein Problem?
Die Komponente benötigt sich selbst, um sich zu instanziieren, wodurch eine Endlosschleife entsteht. Die QML Runtime gibt bei dieser Komponente einen Fehler aus.
Beispiel
// MyComponent.qml
import QtQuick
Item {
MyComponent {}
}Um diese Warnung zu beheben,
- ersetzen Sie die problematische Komponente durch eine andere, falls es sich um einen Fehler handelte.
- Verschieben Sie die Instanziierung auf einen späteren Zeitpunkt, beispielsweise mithilfe der dynamischen QML-Objekterstellung aus 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.