Nesta página

Entrada de enumeração ausente

Essa categoria de aviso é denominada “ [missing-enum-entry] ” pelo qmllint.

Não é uma entrada da enumeração

O que aconteceu?

Você usou um valor de enumeração que não existe.

Por que isso é ruim?

O valor da enumeração ficará indefinido em tempo de execução.

Exemplo

// Main.qml
import QtQuick

Item {
    enum Hello { World }

    Component.onCompleted: function() {
        console.log(Main.Hello.Wordl, Main.Hello.Moon) // both Wordl and Moon are incorrect
    }
}

Para corrigir esse aviso, corrija um possível erro de digitação ou adicione o valor de enumeração ausente à definição:

// Main.qml
import QtQuick

Item {
    enum Hello { World, Moon }

    Component.onCompleted: function() {
        console.log(Main.Hello.World, Main.Hello.Moon) // both correct now
    }
}

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