컴포넌트에 필수 속성이 누락되었습니다.
이 경고 카테고리의 철자는 [required]
입니다.
컴포넌트에 필수 속성이 없습니다.
무슨 일인가요?
컴포넌트의 필수 속성이 설정되지 않았습니다.
이것이 왜 나쁜가요?
컴포넌트에 필수 속성이 누락된 QML 애플리케이션은 정적으로 누락된 필수 속성이 감지되면 전혀 시작되지 않는 등 오작동합니다. 필수 속성이 누락된 동적으로 생성된 컴포넌트는 런타임에 생성되지 않고 대신 null이 됩니다.
예시
import QtQuick Item { component RepeatMe: Item { required property int index; required property int helloWorld; } RepeatMe {} // not ok: required properties index and helloWorld not set Repeater { model: 10 RepeatMe {} // not ok: required property index set by Repeater, but not helloWorld } }
이 경고를 수정하려면 필수 속성을 설정하세요:
import QtQuick Item { component RepeatMe: Item { required property int index; required property int helloWorld; } RepeatMe { index: 0 helloWorld: 42 } // ok: all required properties were set Repeater { model: 10 RepeatMe { helloWorld: index * 2 + 1 } // ok: all required properties were set: index by the Repeater and helloWorld by the user } }
QML 코딩 규칙 - 필수 속성을참조하세요 .
© 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.