Entrée d'énumération manquante
Cette catégorie d'avertissement est orthographiée « [missing-enum-entry] » par qmllint.
N'est pas une entrée de l'énumération
Que s'est-il passé ?
Vous avez utilisé une valeur d'énumération qui n'existe pas.
Pourquoi est-ce un problème ?
La valeur de l'énumération sera indéfinie lors de l'exécution.
Exemple
// 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
}
}Pour résoudre cet avertissement, corrigez une éventuelle faute de frappe ou ajoutez la valeur d'énumération manquante à la définition :
// 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.