title: How to log uncaught exceptions of a QApplication?
body: <p>Where should i use an except block in order to log exceptions of a <code>QApplication</code>?</p>
  
  <p>This doesn't seem to work:</p>
  
  <pre><code>app = QtGui.QApplication(sys.argv)
  MainWindow = MainWindow()
  MainWindow.show()
  try:
      eventLoop = app.exec_()
  except Exception, e:
      log.exception(str(e))
  </code></pre>
  
  <p>as the exception won't even reach that block.</p>