I have QtCoreApplication running from main.
the application runs beautifully, at some point I want to invoke shutdown of the application (and process). I tried to use delete later methods but I still get
QObject was deleted directly. core dumped

I'm really looking for a quick an dirty solution. I don't care about shutdown sequence, or in what goes in the other threads I'm running. I only want to avoid getting this log error. but the following things I tried got me no where.

a. when I try to use(from the same thread as the main thread):
QCoreApplication::instance().quit()
or
QTimer::singleShot(0,QCoreApplication::instance(), SLOT(quit()))
QEventLoop: can't be used without QApplication
b. If I try exit(0); I get
"QThread: Destroyed while thread still running"

what is the minimum requirement qt needs to have as to avoid any possible error at shut down? (and where I can read about it in qt documentation, all I could google up is people facing those kind of mess and do X do Y .. )
thanks in advance!!