Added Qt5 support for QApplication