Is it possible to determine on run-time if a QCoreApplication or a QApplication is running?