Unfortunately not! I would need to determine if a console (QCoreApplication) or GUI (QApplication) has been instantiated.