Weird behavior at application startup - "QObject: Cannot create children for parent that is in a different thread" but there is just one thread - promise!
colleague of mine got some strange behavior at application startup.
He has a Object derived from QCoreApplication (- lets call it MyApp) and tries to instantiate a child object in with MyApp as a parent. Doing this results in the above-named warning - but there is no other thread than the main thread in the process - i've checked it. Twice!
Any idea about this?
May I ask why you are deriving from QCoreApplication?
Because we like to have a clean interface and want to avoid tons of code in main().
We've done this in several projects before and never got problems with it.
What exactly are you creating there ?
You need to show some code.
Was QCoreApplication constructor called?
You might get such effect if it was not or other QObjects were instantiated before QCoreApplication was constructed.