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

Error when assigning to a property aliased to a property of type Component

    XMLWordPrintable

Details

    • fd68b868aee89f40138492468745f0e5edb3286e

    Description

      I get "Error: Cannot assign [undefined] to QDeclarativeComponent*" when I assign to the property alias sourceComponent in the below qml.

      import QtQuick 1.1
      
      Rectangle {
          id: root
          width: 400
          height: 400
          property alias sourceComponent: loader.sourceComponent
      
          Loader {
              id: loader
          }
      
          MouseArea {
              anchors.fill: parent
              onClicked: {
                  loader.sourceComponent = undefined // OK
                  root.sourceComponent = undefined // error
              }
          }
      }
      

      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)
            girish Girish Ramakrishnan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes