このページでは

型が再帰的にインスタンス化されています

この警告カテゴリは、qmllint によって「[type-instantiated-recursively] 」と表記されます。

型を再帰的にインスタンス化することはできません

何が起きたのか?

あるコンポーネントが自分自身をインスタンス化しました。

なぜこれが問題なのでしょうか?

コンポーネントは自身をインスタンス化するために自分自身を必要とし、無限ループが発生します。QML Runtimeはこのコンポーネントでエラーを返します。

例

// MyComponent.qml
import QtQuick

Item {
    MyComponent {}
}

この警告を修正するには、

// MyComponent.qml
import QtQuick

Item {
    // solution 1: MyComponent was not needed here, use another type
    Item {}

    // solution 2: add a MyComponent property and set it later
    property MyComponent myChild
}

© 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.