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

QML module API does not support property aliases

    XMLWordPrintable

Details

    • c263c6c832be3be85beb83e1ee2cce396874bf04

    Description

      Module API:

      class MyApi : public QObject
      {
          Q_OBJECT
          Q_PROPERTY(int foo READ foo WRITE setFoo NOTIFY fooChanged)
      
      public:
          int foo() const;
          void setFoo(int foo);
      
      signals:
          void fooChanged();
      };
      

      Usage:

      import MyApi as MyApi
      
      Item {
          property alias foo: MyApi.foo
      }
      
      

      Error:

      Invalid alias reference. Unable to find id "MyApi"
      property alias foo: MyApi.foo

      Attachments

        For Gerrit Dashboard: QTBUG-21420
        # Subject Branch Project Status CR V

        Activity

          People

            chriadam Christopher Adams (closed Nokia identity) (Inactive)
            jpnurmi J-P Nurmi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes