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.