이 페이지에서

중복 인라인 컴포넌트

qmllint에서는 이 경고 범주를 ‘ [duplicate-inline-component] ’로 표기합니다.

중복 인라인 컴포넌트

무슨 일이 발생했나요?

두 개의 인라인 컴포넌트 이름이 동일합니다.

왜 문제가 될까요?

하나의 이름이 둘 이상의 유형을 가리키므로 모호성이 발생합니다. 이로 인해 컴파일에 실패하게 됩니다.

예시

import QtQuick

Item {
    component R : Rectangle { color: "red" }
    component R : Rectangle { color: "blue" } // Fail to compile
}

이 경고를 해결하려면 인라인 컴포넌트 중 하나를 제거하거나 이름을 변경하세요:

import QtQuick

Item {
    component RedRectangle : Rectangle { color: "red" }
    component BlueRectangle : Rectangle { 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.