title: How to move a component with a custom property to a separate file in QML
body: <p>I have a delegate for a language-selection list. Each item in the list contains an icon and text. 
  I'd like to move the component definition to a different file and provide the string currently defined by IMGDIR as a property. </p>
  
  <p>Simply moving the entire text below to a separate LandDelegate.qml file and including it as:</p>
  
  <pre><code>LangDelegate { id: langDlg }
  </code></pre>
  
  <p>doesn't work.</p>
  
  <p>Below is the declaration of the component. </p>
  
  <pre><code>Component {
      id: langDlg
      Item {
          id: wrapper
  
          width: langView.width
          height: langImg.height+10*2
  
          Rectangle {
              id: background
              x: 2; y: 2; width: parent.width - x*2; height: parent.height - y*2
              color: "lightgrey"
              border.color: "orange"
              radius: 5
          }
  
          states: State {
              name: "Current"
              when: wrapper.ListView.isCurrentItem
              PropertyChanges { target: wrapper; x: 20 }
          }
          transitions: Transition {
              NumberAnimation { properties: "x"; duration: 200 }
          }
          MouseArea {
              anchors.fill: parent
              hoverEnabled: true
              onEntered: { wrapper.ListView.view.currentIndex = index; }
              onClicked: { wrapper.ListView.view.currentIndex = index; langSelect.visible = false; docView.visible  = true }
          }
  
          Row {
              id: topLayout
              x: 10; y: 10; height: langImg.height + 10*2; width: parent.width
              spacing: 10
  
              Image {
                  id: langImg
                  //width: 50; height: 50
                  source: IMGDIR+licon
              }
  
              Column {
                  width: background.width - langImg.width - 20; height: langImg.height
                  spacing: 5
  
                  Text {
                      text: lname
                      font.bold: true; font.pointSize: 16
                  }
              }
          }
      }
  }
  </code></pre>