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

Enumerators whose name begin with a non-capital letter are undefined in QML

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Not Evaluated Not Evaluated
    • None
    • 4.7.1
    • None
    • Windows XP Professional (Version 2002, Service Pack 3) and Mac Os X Snow Leopard (Version 10.6.5).

      Only enumerators whose name begins with a capital letter are recognized in QML code. For example, if one defines the following enumerated type in a class and then reveals it to QML, only the first, the second, and the fourth enumerators are recognized and the other two are undefined:

      enum Type

      { Other = 0, TypeA, typeB, TypeC, tYPEd }

      There is no such limitation in C++ in general.

        1. enum.pro
          0.2 kB
          P-H Niemenlehto
        2. enum.qrc
          0.1 kB
          P-H Niemenlehto
        3. foo.h
          0.3 kB
          P-H Niemenlehto
        4. main.cpp
          0.3 kB
          P-H Niemenlehto
        5. ui.qml
          0.4 kB
          P-H Niemenlehto
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            aakenned Aaron Kennedy
            phn P-H Niemenlehto
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes