start QApplication before doing other Qt stuff