TST: QApplication doesn't quit early enough with PySide....
TST: QApplication doesn't quit early enough with PySide.
Fixes
#1628. This commits adds a check in tests, to see if there's
already a QApplication and use it, instead of creating a new one each
time.