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

Qt Quick enums must start with a capital letter

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.6.0 RC
    • 5.5.0
    • Documentation
    • None

    Description

      Qt Quick appears to require that enums in registered types start with a capital letter.

      This isn't mentioned anywhere I could find.

      Working enum definition
      enum EnStyle
      {
          STYLE_RADIAL,
          STYLE_ENVELOPE,
          STYLE_FILLED
      };
      Q_ENUMS(EnStyle)
      
      Non-functional enum definition
      enum EnStyle
      {
          styleRADIAL,
          styleENVELOPE,
          styleFILLED
      };
      Q_ENUMS(EnStyle)
      

      This should be added to the pages that talk about this:
      http://doc.qt.io/qt-5/qtqml-cppintegration-definetypes.html
      http://doc.qt.io/qt-5/qqmlengine.html#qmlRegisterType-4
      http://doc.qt.io/qt-5/qqmlengine.html#qmlRegisterUncreatableType

      (Not sure if this is all, but it's most)

      Attachments

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

        Activity

          People

            vertries Nico Vertriest (Inactive)
            richard15 R Thompson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes