Fix QApplication usage