Use QApplication instead of QCoreApplication with Qt5.