title: Getting focus/activeFocus status from QML ListView
body: <p>I've a two column layout with a ListView in the left column. With the Left/Right Keys I can change focus between the two parts of the app.</p>
  
  <p>The <strong>active focus</strong> of the left column is delegated to the ListView and from there straight to one of it's rows.</p>
  
  <p>How can I check whether the ListView or one of it's children has focus?</p>
  
  <pre><code>import QtQuick 1.1
  
  FocusScope {
      width: 960
      height: 540
      id: app
      focus: true
  
      FocusScope {
          id: leftColumn
          KeyNavigation.right: rightColumn
          anchors.bottom: parent.bottom
          anchors.left: parent.left
          anchors.top: parent.top
          width: 250
          focus: true
  
          Rectangle {
              id: leftBackgroundColor
              anchors.fill: parent
              color: contactsList.activeFocus ? "red" : "#E6E6E6"
  
              ListView {
                  id: contactsList
                  interactive: true
                  anchors.fill: parent
                  focus: true
  
                  delegate: Text {
                      text: name
                      font.bold: activeFocus
                  }
                  model: ListModel {
                      ListElement { name: "Simon" }
                      ListElement { name: "Mary" }
                      ListElement { name: "Jack" }
                      ListElement { name: "Frank" }
                  }
  
              }
          }
       }
  
  
      FocusScope {
          id: rightColumn
          KeyNavigation.left: leftColumn
  
          anchors.left: leftColumn.right
          anchors.right: parent.right
          anchors.bottom: parent.bottom
          anchors.top: parent.top
          onFocusChanged: console.log("Right focus changed: " + focus + "/" + activeFocus)
  
          Rectangle {
              id: rightBackgroundColor
              anchors.fill: parent
              focus: true
              color: activeFocus ? "red" : "#b3b3b3"            
          }
      }
  }
  </code></pre>