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

[qmltc] property alias causes "unknown origin" error

    XMLWordPrintable

Details

    • d28f088371 (qt/qtdeclarative/dev) d28f088371 (qt/tqtc-qtdeclarative/dev) aaa081f12d (qt/qtdeclarative/6.4) aaa081f12d (qt/tqtc-qtdeclarative/6.4)

    Description

      SubComponent.qml:

      Item {
          property bool setMe: false
      } 

      Component.qml:

      Item {    
          property alias firstComponent: firstComponent
          SubComponent {
              id: firstComponent
          }
      } 

      main.qml:

      Item {
          MainComponent{
              firstComponent.setMe: true
          }
      } 

      when using the type compiler, the code generation fails with: "QML base type has unknown origin. Do you miss an import?".

      as a workaround one can set `firstComponent.setMe` inside a `Component.onCompleted` handler, but one cannot initialize the setMe property via the property alias directly

       

      Attachments

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

        Activity

          People

            agolubev Andrei Golubev
            timblechmann tim blechmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes