//In some thread:
{// which should be called the app thread, but is often called the "main" thread, leading to confusion with the thread of int main(){... },
QApplication app; // may be any kind of QCoreApplication derived class....
app.exec();
}

Now somewhere else in some other thread I want to know if the qapp has been created and if exec has been called and if exec has finished.
auto app= QCoreApplication::instance();// gets us the app if any, in the most generic, non thread safe way
assert(app!=nullptr);// its not nullptr, so it has been created.

// now what I would want is:
app->startup_completed(); // has the constructor of app finished. Or preferably for the qapplication singleton factory to be thread safe. Its insane that it is not.
app->exec_started(); // has the exec been started and has it not yet finished. Note simply querying the eventloop is not feasible as the eventloop may have hung.
app->exec_finished(); // has exec finished

What I find are:
static bool startingUp(); // non thread safe way to tell if the app is starting up, unclear what this means. Does it mean the constructor is currently beeing called?
static bool closingDown(); // non thread safe way to tell if the destructor is being called? what?

The purpose is writing a generic thread safe qapplication factory, the question is simple, how do I tell if the app is running its event loop?

The earlier answers on this forum to this question are wrong or incomplete.

cheers
//mikael