title: Signal between QML with Repeater
body: <p>I have the following qml files, the main.qml creates TestWindow.qml elements.</p>
  
  <p>I would like to connect a signal in TestWindow.qml (click on a button mySignalToMainWindow() ) to a function in main.qml, testConnection().</p>
  
  <p>main.qml</p>
  
  <pre><code>Window {
      id: _component
  
      property int instances: 3
  
      width: 200
      height: Screen.height / 2
      visible: true
  
      Component.onCompleted: {
          x = 40
          y = 40
      }
  
      Repeater {
          id: _windows
          model: instances
          TestWindow {
              index: model.index
              leftOffset: _component.width
          }
      }
  
      Column {
          Repeater {
              model: instances
              Button {
                  text: "Window " + index
                  onClicked:{ _windows.itemAt(index).window.raise();
                  }
              }
          }
      }
  
      function testConnection(){console.log("Subwindow To Main Window")}
  }
  </code></pre>
  
  <p>And TestWindow.qml :</p>
  
  <pre><code>Item {
      id: _windowItem
      property int index
      property int leftOffset
      property alias window: _window
      signal mySignalToMainWindow()
  
      Window {
          id: _window
  
          visible: true
          title: "SubWindowText " + index
  
          Component.onCompleted: {
              x = leftOffset
              y = 40
              width = Screen.width - leftOffset
              height = Screen.height / 2
          }
  
          Text {
              id: windowText
              text: qsTr("SubWindowText")
          }
  
          Button {
              text: "SubWindow " + index
              onClicked: {console.log("TestWindow::Button onClicked "+_window);
                  _windowItem.mySignalToMainWindow();
              }
          }
      }
  
  }
  </code></pre>
  
  <p>I tested those two :</p>
  
  <p><a href="https://stackoverflow.com/questions/36082678/how-to-bind-to-a-signal-from-a-delegate-component-within-a-listview-in-qml">How to bind to a signal from a delegate component within a ListView in QML</a>
  and
  <a href="https://stackoverflow.com/questions/20111218/how-to-access-dynamically-randomly-loaded-repeater-items-in-qml">How to access dynamically/randomly loaded Repeater items in QML?</a></p>
  
  <p>with no success.
  So, how to do that?</p>
  
  <p>Thanks</p>