최상위 구성 요소
이 경고 범주의 철자는 [top-level-component]
입니다.
QML 최상위 유형은 컴포넌트가 될 수 없습니다.
무슨 일이 있었나요?
QML 파일의 최상위 유형으로 Component 유형을 사용했습니다.
이것이 왜 나쁜가요?
QML 파일에 이미 컴포넌트가 자체적으로 정의되어 있기 때문입니다. Component
유형을 최상위 유형으로 사용하면 컴포넌트가 불필요한 다른 컴포넌트로 래핑됩니다.
예시
import QtQuick Component { Item { ... } }
이 경고를 해결하려면 여분의 컴포넌트 래핑을 제거하세요:
import QtQuick Item { ... }
© 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.