이 페이지에서

생성할 수 없는 유형

qmllint에서는 이 경고 범주를 ' [uncreatable-type] '로 표기합니다.

네임스페이스는 대문자로 시작해야 합니다

무슨 일이 있었나요?

소문자 네임스페이스의 QML 객체를 사용했습니다.

왜 문제가 될까요?

QML 언어는 소문자 네임스페이스를 허용하지 않습니다.

예시

import QtQuick as quick

quick.Item { ... }

이 경고를 해결하려면 네임스페이스의 이름을 대문자로 시작하도록 변경하십시오:

import QtQuick as Quick

Quick.Item { ... }

싱글톤 유형을 생성할 수 없습니다

무슨 일이 일어난 걸까요?

싱글톤 타입에서 QML 객체를 인스턴스화하려고 했습니다.

왜 문제가 될까요?

QML 언어는 싱글톤의 인스턴스 생성을 허용하지 않습니다.

예시

import QtQuick

Item {
    Qt { // note: Qt is a singleton type
        id: qt
    }

    property string someProperty: qt.uiLanguage
}

이 경고를 해결하려면, 인스턴스를 생성하지 않고 싱글톤을 직접 사용하십시오:

import QtQuick

Item {
    property string someProperty: Qt.uiLanguage
}

유형을 생성할 수 없습니다

무슨 일이 일어난 걸까요?

uncreatable type 에서 QML 객체를 인스턴스화하려고 했습니다.

왜 문제가 될까요?

생성 불가능한 타입은 인스턴스화를 금지하도록 특별히 표시되어 있습니다. 부착 타입이나 인터페이스로만 사용해야 하는 타입을 잘못 사용하고 있을 수 있습니다.

예시

부착형(attached type)의 오용

import QtQuick

Item {
    Keys {
        onPressed: function (key) { ... }
    }
}

이 경고를 해결하려면 ` Keys ` 부착형 타입을 인스턴스화하지 말고 다음과 같이 사용하십시오:

import QtQuick

Item {
    Keys.onPressed: function (key) { ... }
}

인터페이스 오용

import QtQuick

Item {
    property PointerHandler myHandler: PointerHandler {}
}

이 경고를 해결하려면 TapHandler 과 같이 더 구체적인 파생 타입을 사용하십시오:

import QtQuick

Item {
    property PointerHandler myHandler: TapHandler {}
}

© 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.