Il tipo viene istanziato in modo ricorsivo
Questa categoria di avviso viene indicata da qmllint con la dic [type-instantiated-recursively].
Il tipo non può essere istanziato in modo ricorsivo
Cosa è successo?
Un componente si è istanziato da solo.
Perché è un problema?
Il componente ha bisogno di se stesso per istanziarsi, creando un ciclo infinito. Il QML Runtime genererà un errore su questo componente.
Esempio
// MyComponent.qml
import QtQuick
Item {
MyComponent {}
}Per risolvere questo avviso,
- sostituire il componente problematico con un altro, se si trattava di un errore.
- Rimandare l'istanziazione a un momento successivo, ad esempio utilizzando la creazione dinamica di oggetti QML da 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.