use QApplication to get the instance instead of QGuiApplication