[Interest] Scoped enums in QML and plugin of qmllint

A. Klitzing aklitzing at gmail.com
Thu Aug 28 15:17:47 CEST 2025


Hi there,

We are using RegisterEnumClassesUnscoped=false for our exposed C++
enums. Now we have also defined enums directly in QML. In QML as well,
both notations are possible. We would like to restrict this so that
only the long form is allowed. Is there an equivalent mechanism for
QML enums?

Furthermore, we tried to move this check into a custom plugin for
qmllint. However, we are currently stuck because so far we have not
found a way to locate an "enum" of an QQmlSA::Element. How can we
access it in a QQmlSA::ElementPass? In addition, the usage of the enum
ultimately ends up in a QQmlSA::BindingType::Script. How can we then
continue to access the actual usage locations from there?

Best regards
   André Klitzing


More information about the Interest mailing list