title: Why does anchors.fill does not work in a QML ListView's delegate's subviews, and what is a nice solution?
body: <p>I encountered this:</p>
  
  <pre><code>ListView {
      id: listView
      model: ["Lorem","Ipsum"]
      delegate: Item {
  
          height: 20
          Text {
              z: 2
              text: modelData
              anchors.fill: parent
          }
  
          Rectangle {
              z: 1
              color: "red"
              // this does not work:
              anchors.fill: parent
              // this works, but I have mixed feelings about it:
              // height: 20; width: listView.width
          }
      }
  }
  </code></pre>
  
  <p>So, apparently, <code>anchors</code> do not work in a delegate's subitem (in this case, <code>Rectangle</code> is not displayed at all). I would like to understand the mechanism behind this. Also, I'd like to ask what is the preferred way to deal with this situation?
  Thank You!</p>