見つからないプロパティ

この警告カテゴリのスペルは[missing-property] です。

存在しないデフォルトプロパティに代入できない

何が起こりましたか?

存在しないデフォルトプロパティにオブジェクトを割り当てました。

これはなぜ悪いのでしょうか?

QMLエンジンは実行時にこのオブジェクトを割り当てることができません。

import QtQuick

Item {
    component MyType: QtObject { property Item myItem; }

    MyType {
        Item {}
    }
}

この警告を修正するには、バインドしたいプロパティを指定するか、もしあなたが型の作成者であれば、プロパティをデフォルトとしてマークしてください:

import QtQuick

Item {
    component MyType: QtObject { property Item myItem; }

    MyType {
        myItem: Item {}
    }

    component AlternativeMyType: QtObject { default property Item myItem; }

    AlternativeMyType {
        Item {} // bound to myItem via default property
    }
}

プロパティが存在しません

何が起こったのでしょうか?

存在しないプロパティに式を割り当てました。

これはなぜ悪いのでしょうか?

QMLエンジンは実行時にこの式を代入することができません。

import QtQuick

Item {
    property int myInt
    myItn: 42
}

この警告を修正するには、バインディングを削除するか、タイプミスを修正してください:

import QtQuick

Item {
    property int myInt
    myInt: 42
}

型にメンバが見つかりません

何が起こったのでしょうか?

QMLツールで見つけられないフィールドメンバ式内のメンバにアクセスしました。

フィールド・メンバー式とは、someId.someProperty.

これはなぜ悪いのでしょうか?

QMLツールはこのメンバを見つけることができず、QMLエンジンもおそらく見つけることができません。

import QtQuick

Item {
    id: self
    property int myInt
    property int myInt2: 1 + self.myItn
}

この警告を修正するには、バインディングを削除するか、タイプミスを修正してください:

import QtQuick

Item {
    id: self
    property int myInt
    property int myInt2: 1 + self.myInt
}

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