컴포넌트에는 정확히 하나의 자식이 있어야 합니다.
이 경고 카테고리의 철자는 [component-children-count] 입니다.
컴포넌트에는 정확히 하나의 자식이 있어야 합니다.
무슨 일인가요?
컴포넌트의 자식 수가 잘못되었습니다. 정확히 하나만 있어야 합니다.
왜 나쁜가요?
파일의 루트 컴포넌트는 인스턴스화되지 않으며 런타임에 오류를 일으킵니다.
예시
Component { Rectangle { width: 50 height: 50 color: "red" } Rectangle { width: 50 height: 50 color: "blue" } }
이 경고를 해결하려면 컴포넌트에 정확히 하나의 자식이 있는지 확인하세요. 비어 있으면 자식을 추가하세요. 여러 개의 자식이 있는 경우 초과 자식을 제거하거나 자식을 구성 요소의 최상위 자식 하나로 래핑합니다.
© 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.