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

Module APIs should support enums

    XMLWordPrintable

Details

    • 9140731319269c75f24e80075750971e00844906

    Description

      A module API based on QObject should allow enums to be exposed, e.g.

      class MyApi : public QObject
      {
          Q_ENUMS(MyEnum)
      
      public:
          enum MyEnum { A, B };
      
          Q_INVOKABLE myFunction(MyEnum e);
      };
      
      import MyApi as MyApi
      
      Component.onCompleted: MyApi.myFunction(MyApi.A)
      

      Attachments

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

        Activity

          People

            chriadam Christopher Adams (closed Nokia identity) (Inactive)
            martjone Martin Jones (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes