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

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

    XMLWordPrintable

Details

    Description

      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?

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes