상속 주기
이 경고 범주의 철자는 [inheritance-cycle]
입니다.
컴포넌트가 상속 주기의 일부입니다.
무슨 일이 일어났나요?
컴포넌트는 그 자체로부터 직접 또는 간접적으로 상속받습니다.
일반적으로 컴포넌트는 다른 컴포넌트로부터 속성, 메서드, 신호 및 열거형을 상속할 수 있습니다.
컴포넌트가 다른 기본 컴포넌트를 통해 직접 또는 간접적으로 자신을 상속하는 경우 상속 주기를 형성합니다. 이 경고는 현재 컴포넌트가 상속 주기 안에 있음을 나타냅니다( 예시 참조).
이것이 왜 나쁜가요?
상속 주기가 있는 컴포넌트는 런타임에 생성되지 않고 대신 null이 됩니다.
예시
import QtQuick Item { component Cycle: Cycle {} // not ok: directly inherits from itself component C: C2 {} // not ok: indirectly inherits from itself component C2: C{} }
이 경고를 해결하려면 상속 주기를 분리하세요:
© 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.