Nesta página

Tipo não criável

Essa categoria de aviso é denominada “ [uncreatable-type] ” pelo qmllint.

O namespace deve começar com uma letra maiúscula

O que aconteceu?

Você usou um objeto QML de um namespace com letras minúsculas.

Por que isso é ruim?

A linguagem QML proíbe namespaces com letras minúsculas.

Exemplo

import QtQuick as quick

quick.Item { ... }

Para corrigir o aviso, renomeie o namespace para que comece com uma letra maiúscula:

import QtQuick as Quick

Quick.Item { ... }

O tipo Singleton não pode ser criado

O que aconteceu?

Você tentou instanciar um objeto QML a partir de um tipo singleton.

Por que isso é inadequado?

A linguagem QML proíbe a instanciação de singletons.

Exemplo

import QtQuick

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

    property string someProperty: qt.uiLanguage
}

Para corrigir o aviso, use o singleton diretamente, sem instanciá-lo:

import QtQuick

Item {
    property string someProperty: Qt.uiLanguage
}

O tipo não pode ser criado

O que aconteceu?

Você tentou instanciar um objeto QML a partir de um ` uncreatable type`.

Por que isso é incorreto?

Tipos não criáveis são especificamente marcados para proibir instanciações. Você pode estar usando incorretamente um tipo que só deve ser utilizado como tipo anexado ou como interface.

Exemplo

Uso indevido de tipo anexado

import QtQuick

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

Para corrigir o aviso, use o tipo anexado Keys em vez de instanciá-lo:

import QtQuick

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

Uso incorreto de interface

import QtQuick

Item {
    property PointerHandler myHandler: PointerHandler {}
}

Para corrigir o aviso, use um tipo derivado mais 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.