Id shadows メンバー
この警告カテゴリは、qmllint によって「[id-shadows-member] 」と表記されます。
プロパティ、メソッド、またはシグナルのIDが重複しています
何が起きたのか?
ある ID が、同じコンテキスト内のプロパティ、メソッド、またはシグナルをカプセル化している可能性があります。
なぜ問題なのか?
そのプロパティ、メソッド、またはシグナルに、修飾子なしの名前ではアクセスできなくなります。これまでその名前でアクセスしていたコードは、代わりにその ID に黙ってアクセスすることになり、発見しにくいバグにつながる可能性があります。
例
import QtQuick
Item {
Item { id: helloWorld }
property int helloWorld: 42
Component.onCompleted: console.log(helloWorld) // not 42
}この警告を解消するには、ID または隠蔽されているメンバーの名前を変更してください。
© 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.