title: How to intercept and propagate an event from overlapping widgets
body: <p>I'd like to intercept an event from a widget placed on-top of another widget, without consuming it.</p>
  
  <p>Here's what I've got so far. When clicking the overlapping part, I'd like it to print "Hello World", but all I'm getting is "Hello".</p>
  
  <p><img src="https://cloud.githubusercontent.com/assets/2152766/5327298/221c4e98-7d40-11e4-9b19-d52f5bac1b85.png" alt="image"></p>
  
  <pre><code>import sys
  from PyQt5 import QtWidgets
  
  
  class Button(QtWidgets.QPushButton):
      def mousePressEvent(self, event):
          print self.text()
          return super(Button, self).mousePressEvent(event)
  
  
  app = QtWidgets.QApplication(sys.argv)
  window = QtWidgets.QWidget()
  window.setFixedSize(200, 100)
  
  button1 = Button("World", window)
  button1.move(10, 10)
  button2 = Button("Hello", window)
  button2.move(50, 15)
  
  window.show()
  app.exec_()
  </code></pre>
  
  <p>Here's an example in QML that does what I'm looking for.</p>
  
  <p><img src="https://cloud.githubusercontent.com/assets/2152766/5343885/070817e0-7f02-11e4-8750-7ebaef10a409.png" alt="image"></p>
  
  <pre><code>import QtQuick 2.0
  
  
  Item {
      id: root
      width: 200; height: 100
  
      MouseArea {
          anchors.fill: parent
          onPressed: console.log("World")
      }
  
      Rectangle {
          color: "green"
          width: 100; height: 50
          x: 10; y: 10
  
          MouseArea {
              anchors.fill: parent
              propagateComposedEvents: true
              onPressed: {
                  console.log("Hello");
                  mouse.accepted = false;
              }
          }
      }
  }
  </code></pre>
  
  <p>Clicking the window yields "World" whereas clicking the green rectangle yields "Hello" followed by "World". The key here is the <a href="http://qt-project.org/doc/qt-5/qml-qtquick-mousearea.html#propagateComposedEvents-prop" rel="nofollow"><code>propagateComposedEvents</code></a></p>