title: Create a truly headless QApplication instance
body: <p>I have a Qt 5.8 (via PyQt5) application whose many tests require a live <code>QApplication</code> instance in order to test gui widget interactions.</p>
  <p>However on my new Mac OS X (10.11.6) machine when running these tests windows are constantly being created and destroyed, causing the entire system's UI to become highly unstable (although the tests pass as expected).</p>
  <p>My tests do not even call <code>QApplication.exec()</code> - the <code>QApplication()</code> constructor is enough to cause this. On my linux machine this is no issue, as windows are not created (at least under my X configuration).</p>
  <p><code>QCoreApplication</code> is not an option as actual GUI widgets need to be created and worked with. Attempts to swap the two cause massive test failures.</p>
  <p>Is there a way in Qt 5.8 to create a truly headless <code>QApplication</code> instance without using <code>QCoreApplication</code>?</p>