En esta página

Tipo no creable

Esta categoría de advertencia se escribe [uncreatable-type] por qmllint.

El espacio de nombres debe comenzar con una letra mayúscula

¿Qué ha ocurrido?

Has utilizado un objeto QML de un namespace en minúsculas.

¿Por qué es malo?

El lenguaje QML prohíbe los espacios de nombres en minúsculas.

Ejemplo

import QtQuick as quick

quick.Item { ... }

Para corregir la advertencia, cambie el nombre del espacio de nombres para que empiece con mayúscula:

import QtQuick as Quick

Quick.Item { ... }

El tipo Singleton no es creable

¿Qué ha ocurrido?

Ha intentado instanciar un objeto QML a partir de un tipo singleton.

¿Por qué es malo?

El lenguaje QML prohíbe la instanciación de singletons.

Ejemplo

import QtQuick

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

    property string someProperty: qt.uiLanguage
}

Para corregir la advertencia, utilice el singleton directamente sin instanciarlo:

import QtQuick

Item {
    property string someProperty: Qt.uiLanguage
}

El tipo no es creable

¿Qué ha ocurrido?

Ha intentado instanciar un objeto QML a partir de uncreatable type.

¿Por qué es malo?

Los tipos no creables están marcados específicamente para prohibir las instancias. Puede que estés utilizando indebidamente un tipo que sólo debería usarse como tipo adjunto o como interfaz.

Ejemplo

Uso incorrecto de un tipo adjunto

import QtQuick

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

Para corregir la advertencia, utilice el tipo adjunto Keys en lugar de instanciarlo:

import QtQuick

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

Uso incorrecto de una interfaz

import QtQuick

Item {
    property PointerHandler myHandler: PointerHandler {}
}

Para corregir la advertencia, utilice un tipo derivado más específico como 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.