Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-123542

"Invalid QML element name" works and "valid" don't work

XMLWordPrintable

      As an alternative to QTBUG-123535 I tried to use a Q_GADGET here. It works if I use an upper case (as I like to use enumeration names) but throws a warning that it needs to be lower case. If I use lower case (that I do not like) the warning is vanished but I cannot get it in qml anymore (in lower case, of course).

      See attached example.
      It will throw "qt.qml.typeregistration: Invalid QML element name "Flupp"; value type names should begin with a lowercase letter" on runtime.

      If I rename it in Q_CLASSINFO("QML.Element", "flupp") in base_enum.h and Main.qml I that error:
      qrc:/qt/qml/Stuff/Main.qml:9: ReferenceError: flupp is not defined

      How can I avoid the warning and just use my enums upper case?

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qtqmlteam Qt Qml Team User
            misery André Klitzing
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes